Highlight a area with Google Maps JavaScript API v

2019-02-20 12:43发布

I want to highlight a area like on the image below which is taken from Google Maps. Is this possible to accomplish with the current version of their API (v3)? If yes, how?

google-maps-highlight

Thanks in advance.

1条回答
ゆ 、 Hurt°
2楼-- · 2019-02-20 13:12

You need to know the vertices of the area and create a polygon based on them.

But dashed strokes currently are not supported by polygons, if you require to have a dashed stroke you must create a sequence of polylines with different stroke-colors based on the vertices.

A built-in method to highlight an area currently doesn't exist.

查看更多
登录 后发表回答