Click here to Skip to main content
13,588,935 members
Rate this:
Please Sign up or sign in to vote.
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 18-Jan-13 12:00pm
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.180615.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

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