partiz
partiz

Reputation: 1216

gmap3: google map is not center when I update it via jquery

hi there this code works for me.

setMap("France",5);
function setMap(iaddress,izoom){
    $("#test").gmap3({
        marker:{
          address: iaddress
        },
        map:{
          options:{
            zoom: izoom
          }
        }
    });
}

the map will zoom in 5 on france country.

but when run it again with this jquery code:

function checkCitySelect(){
    $("#test2").on('click', function() {
        setMap("Recklinghausen",14);
    });
}

it works but "Recklinghausen" is not center of google map! the center is somewhere in France(the center is last address but zoom works)

for example If I go to "Recklinghausen" manualy. that location marked.

how can go automaticly to "Recklinghausen" when I update map?

Upvotes: 0

Views: 200

Answers (0)

Related Questions