Click here to Skip to main content
11,641,668 members (46,703 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript HTML
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 18-Jan-13 12:00pm
lisalis197
Comments
Garth J Lancaster at 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 at 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)

  Print Answers RSS
0 Mika Wendelius 310
1 DamithSL 213
2 Afzaal Ahmad Zeeshan 139
3 CPallini 134
4 OriginalGriff 120
0 Mika Wendelius 460
1 OriginalGriff 215
2 DamithSL 213
3 CPallini 169
4 Afzaal Ahmad Zeeshan 129


Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100