ammap3
ammap3 copied to clipboard
custom zoomLVL and zoomCoordinates
I want to manipulate zoomLvL and the zoomCoordinates of mapObjects(mapAreas).
with
map.zoomToLongLat(areaZoomLvL + offset, areaLong + offset, areaLat+ offset)
I can zoom to a specific location.
I'm fine with the lat/long. I can get them with
map.getAreaCenterLongitude(mapObject)
and
map.getAreaCenterLatitude(mapObject)
But I couldn't figure out how to get the standard zoomLvL of an area. Is there a way to get the standard zoomLvL of an area or to manipulate the standard zoom behavior?
If you want to make the map zoom to specific area, why don't just use zoomToSelectedObject()
?
E.g.:
map.selectedObject = map.getObjectById("FR");
map.zoomToSelectedObject();
OK, here's a better way. There's an undocumented method zoomToObject
:
map.zoomToObject(map.getObjectById("FR"));
I don't want to zoom to an area. I want to zoom to a point to the right of an area. I want to add an offset to the area coordinates and zoomLvL
Gotcha. Unfortunately, there's currently no way to find out the zoom level for the area. Sorry :(