Using google maps API, how can we set the current location as the default set location using map.set
Posted
by vs1984
on Stack Overflow
See other posts from Stack Overflow
or by vs1984
Published on 2010-05-17T17:02:18Z
Indexed on
2010/05/17
17:20 UTC
Read the original article
Hit count: 263
I am writing Javascript code using Google maps API.
map = new google.maps.Map2(document.getElementById("map_canvas")); map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13);
The above code sets the default location of the map canvas to Palo Alto.
How can we write the script in such a way that the setCenter function automatically points to the current location of the client?
© Stack Overflow or respective owner