i have the following code to update a google map:
function updateit(c1,c2){
alert(c1+"-"+c2); // This works
map.setCenter(new GLatLng(c1, c2), 13); // But this doesn't
}
updateit(37.4419, -122.1419);
The alert is working and show the two coordinations, but i think the GLatLng() doesn’t receive them, so the map is not updated unless i directly declare them as strings :
function updateit(c1,c2){
map.setCenter(new GLatLng(37.4419, -122.1419), 13); // This works
}
How to fix this problem?
Thanks
Dude, this really isn’t enough
This code could be all your app does – logically it isn’t and so much more is happening around it.
This looks absolutely sound. I’m simply guessing you have c1 and c2 mixed up. what does your alert say?
37.4419, -122.1419heads straight to 1708 Fulton Streverse them and it goes no where. Google maps does not find
-122.1419, 37.4419check that buddy.