Click here to Skip to main content
15,892,797 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get the Latitude and Longitude from google maps.

here is my code

function onloadHandler()
{
var loc = new google.maps.LatLng(how to get the lat and long here...)

}

Thanks in advance
Posted
Comments
Garth J Lancaster 18-Jan-13 19:20pm    
I'm not sure your question is entirely clear

How to get the Lat & Long OF WHAT ??? - Your position, the position of some other entity like a building or landmark, or a marker that was added to the map.

If you're after 'you're own position', depending on what sort of device you're doing this on, why not read it directly from the devices GPS sensors ? (eg iPhone, Android) .. because if you're looking at a Google map on these devices, showing 'your position' on the map, thats one way they know where you are to be able to plot it ...

If you're looking for 'some other Lat/Long', then you're going to need to elaborate a bit more
Bandi Ramesh 19-Feb-13 12:04pm    
need more and exact explanation

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900