user1274763
user1274763

Reputation:

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

Upvotes: 6

Views: 3258

Answers (1)

skarE
skarE

Reputation: 5890

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

Upvotes: 2

Related Questions