How to get current zoom level of the map at run time


#1

Hello community, I’m configuring precision queries to perform geohash queries of certain precisions depending on the map zoom level.
So, is there an easy way to query the current zoom level of the map at run time using the JavaScript console?
That way, I can identify the right query precision depending on how the data looks on the map.

Thanks


#2

Hi @robert.dev1, there is a very simple and clean way to do this and it is by getting the current zoom that the Geo Map visualization has. Take a look at the following:

cf.getVisualization('myGeoMap').get('zoom')

I hope this is the answer you are looking for.

Greetings.