Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get current zoom level in openstreetmap?

I am creating a Heat Map with Open Street Map (OSM). When I zoom in I am not sure what zoom level I am at and at which coordinate position. I wanted to get those numbers for future reference if I want to get there directly.

Is there a Open Street Map API or hack that can return the zoom level of the map?

How would I do that?

like image 979
asax Avatar asked Nov 09 '15 00:11

asax


1 Answers

There is getZoom() method in OpenStreetMap API which can be used to get current zoom level. For more information see http://wiki.openstreetmap.org/wiki/OpenLayers

like image 109
Softec Avatar answered Oct 23 '22 20:10

Softec