I have Drupal 7 GMap based map, with many markers. I want to hide the map on windows load, an initialize on click. My problem is: after display map, she don't remember coordonate of center, and map displayed with te bigger zoom. Please help, how to recenter the map, but keep the markers. I tried this code in JQuery, but I don't need a new map.

function initialize(){
   // create the map
   var myOptions = {
     zoom: 8,
     center: new google.maps.LatLng( 32.8512705331102, -117.08586603100235 ),
     mapTypeId: google.maps.MapTypeId.ROADMAP
   map = new google.maps.Map( document.getElementById( "gmap-mymap-gmap0" ),myOptions );


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.