Mimick LatLng tooltip in Google Maps

374 views
Skip to first unread message

EpicAdv

unread,
Jul 21, 2011, 5:35:32 PM7/21/11
to google-map...@googlegroups.com
I'd like to create a tool tip similar to the one in Maps Lab on Google Maps -- the one where you hold down shift and it shows the lat/long of the cursor.

Anyone know how I can do this?

Chris Broadfoot

unread,
Jul 21, 2011, 8:07:36 PM7/21/11
to google-map...@googlegroups.com
Look at OverlayView:

On Fri, Jul 22, 2011 at 7:35 AM, EpicAdv <mikes...@gmail.com> wrote:
I'd like to create a tool tip similar to the one in Maps Lab on Google Maps -- the one where you hold down shift and it shows the lat/long of the cursor.

Anyone know how I can do this?

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/hNluM2E0IpYJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Pil

unread,
Jul 22, 2011, 1:45:26 AM7/22/11
to Google Maps JavaScript API v3


On Jul 21, 11:35 pm, EpicAdv <mikesut...@gmail.com> wrote:
> I'd like to create a tool tip similar to the one in Maps Lab on Google Maps


I'd like to see this behaviour exactly.
Can you provide a link to the example you mean?

EpicAdv

unread,
Jul 22, 2011, 8:05:01 AM7/22/11
to google-map...@googlegroups.com
I'm not sure how to link to it.

Go to maps.google.com
Then click "Maps Labs"
Then enable LatLng Tooltip

I'll attach a screen shot.
screenshot.jpg

Pil

unread,
Jul 23, 2011, 3:28:18 PM7/23/11
to Google Maps JavaScript API v3
Thanks for the description. Not so easy to find nowadays. I think the
labs have been deprecated.

This is a usable link to open the chooser for the labs extensions at
the moment:

http://maps.google.com/maps?showlabs=1


And here you go

http://www.wolfpil.de/v3/coords-in-tooltip.html

It's not completely finished yet, but there is only a tiny piece of
task to do.
>  screenshot.jpg
> 94KViewDownload

Pil

unread,
Jul 25, 2011, 4:50:00 AM7/25/11
to Google Maps JavaScript API v3
Completely finished and updated the example at

http://www.wolfpil.de/v3/coords-in-tooltip.html


When you play around with it, you will notice that the tooltip
sometimes (rarely) looses position. This seems not really
reproducable, only noticable when playing around, zooming in and out,
dragging the map...

This looks like a hardly fixable API bug to me. I noticed that the
returned bounds are randomly junk. Could also be that the conversion
of MapCanvasProjection of the bounds returns randomly junk.

EpicAdv

unread,
Jul 31, 2011, 3:56:35 PM7/31/11
to google-map...@googlegroups.com
Very nice!  Thank you!  Just what I was after.
Reply all
Reply to author
Forward
0 new messages