Reputation: 13
Is there a way to retrieve the coordinates of the center showing on the map?
The user can navigate freely on the map, so the center constantly changes.
How can I retrieve the current center?
Upvotes: 1
Views: 1376
Reputation: 5525
center_latLng = map.getCenter();
center_lat = center_latLng.lat;
center_long = center_latLng.lng;
center_zoom = map.getZoom();
api doc is at
https://developer.here.com/documentation/maps/3.1.37.0/api_reference/H.Map.html#getZoom
Upvotes: 0
Reputation: 879
In JS, map.getCenter()
.
Check javascript developer’s guide at developer.here.com
Upvotes: 2