I have several markers on one map, I also have several links and I want the user to be able to click the link and the map zooms in on the corresponding marker. I want to do this with a jQuery function. I browsed through the source code for gmaps4rails and found references to center_longitude and center_latitude. However using them as Gmaps.map.map.centerLongitude(12) or Gmaps.map.map.center_longitude(12) doesn’t work.
What would the correct function be for dynamically changing where and how much it zooms?
You’re looking for
panTodefined here.Usage:
Btw,
Gmaps.map.map.center_*is dedicated to map initialization.