Round Overlay Title Attribute

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

I tried just setting the title to the google.maps.CircleOptions object, but that does nothing.

Is there a way I can give a circle a title? I assume that when you hover over a circle, the cursor changes to pointer , so there should be some kind of detection there. I donโ€™t want to make my own tooltip and attach it to the hover event on the circle, I want to use the browser built into the title bar.

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

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

+6
source share
1 answer

It is currently not possible to add a title to a circle. As you can see from CircleOptions , it does not display the โ€œnameโ€ as an option that you can use.

The job might be to listen to the mousemove event on the circle and then show your own title as a custom OverlayView

+2
source

Source: https://habr.com/ru/post/917973/


All Articles