asax
asax

Reputation: 237

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?

Upvotes: 6

Views: 4167

Answers (1)

Softec
Softec

Reputation: 1157

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

Upvotes: 2

Related Questions