0

I am trying to bring latitude and longitude of google maps on mouse pointer in a google map web application, has any one tried this before ? if yes, please show me the way to achieve this. I am searching this from couple of days and ended up with empty handed.

Regards, Beginner in UI.

geocodezip
  • 153,563
  • 13
  • 208
  • 237
BeginnertoUI
  • 82
  • 2
  • 11
  • I just searched Google and found this: http://vikku.info/programming/google-maps-v3/get-lattitude-longitude-onclick-and-onmouseover-google-map-v3.htm – shawnt00 Feb 20 '15 at 05:13
  • thanks for the response @shawnt00, currently my app has the feature you mentioned in the link(which is eating up some space). I was looking at something like this in the below link. http://mapshup.com/projects/mapshup/2.5/index.html#ezpgxczbzury:3 (Lat Long is displayed on the tip of mouse pointer) – BeginnertoUI Feb 20 '15 at 05:21

1 Answers1

0

This question has been answered on SO many times before, but here it is again:

google.maps.event.addListener(map, 'click', function(event) {
    alert('Lat: ' + event.latLng.lat() + ' Lng: ' + event.latLng.lng());
});

Check out this answer, or this answer, or this answer for more information. Here's a tutorial linked to by one of those answers.

Community
  • 1
  • 1
Razi Shaban
  • 498
  • 1
  • 6
  • 17
  • thanks for the response @razi shaban, currently my app has the feature you mentioned in the link(which is eating up some space). I was looking at something like this in the below link. mapshup.com/projects/mapshup/2.5/index.html#ezpgxczbzury:3 (Lat Long is displayed on the tip of mouse pointer) – BeginnertoUI Feb 20 '15 at 05:24
  • @BeginnertoUI maybe you should clarify your question -- if you want to make a floating box following around your mouse pointer, that is a very different question. – Razi Shaban Feb 20 '15 at 14:41