Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Title attribute on circle overlays

I understand that google.maps.Marker can have a title set to them in their options, can the same be done for google.maps.Circle?

I've tried just setting title on the google.maps.CircleOptions object, but that doesn't seem to do anything.

Is there a way I can give the circle overlays a title? I imagine there is, as when you hover over a circle, the cursor is changed to pointer so there must be some kind of detection there. I don't want to make my own custom tooltip and attach it to the hover event on the circle, I want to use the browser's built in title hover.

Circles: https://developers.google.com/maps/documentation/javascript/overlays#Circles

CircleOptions object: https://developers.google.com/maps/documentation/javascript/reference#CircleOptions

like image 621
Thrashbarg Avatar asked Jun 13 '12 13:06

Thrashbarg


1 Answers

It is not currently possible to add a title to a circle. As you can see from the CircleOptions, it doesn't list 'title' as a option that you can use.

A work around could be to listen to the mousemove event on the circle then to show your own title as a custom OverlayView

like image 158
skarE Avatar answered Oct 18 '22 04:10

skarE