Module:Infobox mapframe: Difference between revisions

Content deleted Content added
add two more
use zoom set directly by argument over zoom computed from dimensions
Line 193:
args["frame-long"] = config["frame-long"] or config["frame-longitude"] or ""
 
-- if zoom isn't specified from config:
-- Calculate zoom from length or area (converted to km or km2)
local zoom
-- Zoom so that length or area is completely included in mapframe
if not config.zoom then
local getZoom = require('Module:Infobox dim')._zoom
-- Calculate zoom from length or area (converted to km or km2)
local zoom = getZoom({length_km=config.length_km, length_mi=config.length_mi,
-- Zoom so that length or area is completely included in mapframe
width_km=config.width_km, width_mi=config.width_mi,
local getZoom = require('Module:Infobox dim')._zoom
area_km2=config.area_km2, area_mi2=config.area_mi2,
zoom = area_hagetZoom({length_km=config.area_halength_km, area_acrelength_mi=config.area_acrelength_mi,
typewidth_km=config.typewidth_km, populationwidth_mi=config.populationwidth_mi,
area_km2=config.area_km2, area_mi2=config.area_mi2,
viewport_px=math.min(args["frame-width"],args["frame-height"])})
width_kmarea_ha=config.width_kmarea_ha, width_miarea_acre=config.width_miarea_acre,
args.zoom = zoom or config.zoom or DEFAULT_ZOOM
viewport_px=math.min(args["frame-width"],args["frame-height"])})
end
args.zoom = config.zoom or config.zoom or DEFAULT_ZOOM
 
-- Conditionals: whether point, geomask should be shown