Content deleted Content added
wrong function |
update dim/scale conversion, add types |
||
Line 21:
dim = dim*1000
end
-- which seems nuts, but we have to be compatible
▲ -- assuming dim spans a map width of 800px (= 24cm on screen)
-- thus, dim has to correspond to 10cm, so scale is dim (in meters) * 10
return
end
Line 30 ⟶ 31:
scale = tonumber(scale)
if not scale or scale <= 0 then return end
return
end
Line 36 ⟶ 37:
local function geohackTypeToScale(type, population)
local typeScale = {
country = 10000000,
satellite = 10000000,
state = 3000000,
adm1st = 1000000,
adm2nd = 300000,
adm3rd = 100000,
city = 100000,
mountain = 100000,▼
waterbody = 100000,
edu = 10000,
event = 50000,
forest = 50000,
glacier = 50000,
landmark = 10000,
▲ mountain = 100000,
railwaystation = 10000,
▲ waterbody = 100000,
camera = 10000
}
|