Google maps v3 polyline tooltip

前端 未结 4 2438
我在风中等你
我在风中等你 2021-02-20 15:08

A google maps marker object (google.maps.Marker) has a title property, so when a user moves their mouse over the marker a simple tooltip is displayed.

There isn\'t a tit

4条回答
  •  攒了一身酷
    2021-02-20 16:11

    If i'm not mistaken i don't think it is possible to set the tooltip since as you mentioned there is not a title property in PolygonOptions object.But you can make a div that looks exactly the same as the tooltip and place it let's say in the tip of your mouse during the mousemove event.I tried also to find a solution to place this tooltip somewhere in the center of the polygon but i think it is too much of a trouble that's why i also think the google guys didn't implement it also. Cheers

提交回复
热议问题