Change map zoom and center after map is loaded
-
I am trying to change the map zoom and centre with this code, just as a small test. Code is in my page template.
<script> jQuery(function() { var lmm_map_9748caac; lmm_map_9748caac.panTo(new L.LatLng(40.737, -73.923)); lmm_map_9748caac.setView(new L.LatLng(8.407168, 19.687500), 4); }); </script>
But I always get a lmm_map_9748caac is undefined error. That is the name of the map as given in your script on my website. Is there a way to access the map? I would like to have an input field, that changes the map similar to this demo:
https://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-google-maps-mobile.html#places
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Change map zoom and center after map is loaded’ is closed to new replies.