如何设计一个圆圈? [英] How to stylize a circle?

查看:111
本文介绍了如何设计一个圆圈?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过使用图标,可以使用破折号或点将多段线风格化,如使用虚线或点设计Google Maps v3多段线?

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.

推荐答案

一个选项,用google.maps.Polyline绘制一个圆,并设置折线的风格:

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);

示例

这篇关于如何设计一个圆圈?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆