Reputation: 872
Using Ammaps, how can I change the default zoom and center coordinates for when the map loads? I am using a world map but unfortunately I can't get it to start zoomed in over a specific point.
Thanks!
Upvotes: 0
Views: 724
Reputation: 6162
You can define zoomLevel
, zoomLongitude
and zoomLatitude
in your dataProvider
.
"dataProvider": {
"map": "worldLow",
"zoomLevel": 3.5,
"zoomLongitude": -55,
"zoomLatitude": 42,
...
}
Please check this example: https://www.amcharts.com/demos/animations-along-lines/
The other option is to use methods after the chart starts. You can use zoomTo method to zoom to the desired coordinates and the zoom level. Optionally you could try zoomIn in case you want to rely on the default zoom level and you don't need to change the coordinates.
Upvotes: 2