Jump to content

Set a max zoom level for search results map


Theo

Recommended Posts

Re-hi,

 

I have results pages showing more than 50 markers in the whole world. In this case, when hovering a listing title, the selected listing marker isn't really noticeable in the map column because it is a bit lost in the number or hidden behind other markers.

 

To avoid this, I'd like to do the following :

- When the page loads the maps shows all results on the whole map (with zoom set according to markers results as default)

- When hovering a listing title, we get the current zoom level and set it to 4 if the result is lower than 4.

 

In views/js/geomaps.js I added self.map.setZoom(4) in _bindListingTitles function to set the level to 4 but I didn't find any function to get the current zoom... how can I get it ?

 

Thanks for any help,

Théo

Link to comment
×
×
  • Create New...