How to stylize a circle?

匿名 (未验证) 提交于 2019-12-03 02:41:02

问题:

It's possible to stylize polylines with dashes or dots by using icon as described in Styling a Google Maps v3 Polyline with Dashes or Dots?.

But I didn't find how to stylize circles.
Any suggestions, reference please.

回答1:

One option, draw a circle with a google.maps.Polyline and stylize the polyline:

  var donut = new google.maps.Polyline({                  path: drawCircle(new google.maps.LatLng(-33.9,151.2), 100, 1),                  strokeOpacity: 0,                  icons: [{                    icon: lineSymbol,                    offset: '0',                    repeat: '20px'                  }],                  strokeWeight: 2,                  fillColor: "#FF0000",                  fillOpacity: 0.35      });      donut.setMap(map); 

example



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!