使用Google Maps JavaScript API v3突出显示一个区域 [英] Highlight a area with Google Maps JavaScript API v3
问题描述
我想突出显示下图所示的区域,该区域取自 Google地图。这是可能与他们的API(v3)的当前版本完成?如果是,如何?
在此先感谢您。 您需要知道该区域的顶点并根据它们创建一个多边形。
但是当前虚线描边不受多边形支持,如果您需要虚线描边,则必须根据顶点创建具有不同描边颜色的多段折线序列。
现在突出显示区域的内置方法不存在。
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?
Thanks in advance.
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.
这篇关于使用Google Maps JavaScript API v3突出显示一个区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!