Esta sección describe cómo definir el viewport y el tamaño final de la imagen al renderizar mapas con libgd-gis.
BBOX_PARANA_SANTA_FE = [
-61.05,
-32.10,
-60.35,
-31.40
]
map = GD::GIS::Map.new(
bbox: BBOX_PARANA_SANTA_FE,
zoom: 11,
basemap: :esri_satellite,
width: 800,
height: 600
)
GEOJSON = "data/home_store.geojson"
bbox = GD::GIS::Geometry.bbox_for_image(
GEOJSON,
zoom: 13,
width: 800,
height: 600,
padding_px: 100
)
STORE = [-60.69128666, -31.64296384]
bbox = GD::GIS::Geometry.bbox_around_point(
STORE[0],
STORE[1],
radius_km: 0.5
)
width y height son opcionales. Si no se especifican, el tamaño se calcula automáticamente.
