Click here to Skip to main content
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 13: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 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 205
3 DamithSL 165
4 Tomas Takac 144
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2014
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