use*_*787 3 jquery google-maps
但我做不到。这是怎么了?
poly = new google.maps.Polyline({
strokeColor: '#00DB00',
strokeOpacity: 1.0,
strokeWeight: 3,
fillColor: 'green',
fillOpacity: 0.05
});
poly.setMap(map);
Run Code Online (Sandbox Code Playgroud)
小提琴:https://jsfiddle.net/vL6qpn4w/
Doubt:如何使用我的代码绘制多边形?
折线不支持填充颜色,因为它们是简单的线条。尝试使用具有填充和描边属性的多边形 - 给出您在上面尝试的内容。 https://developers.google.com/maps/documentation/javascript/shapes#polygons
poly = new google.maps.Polygon({
strokeColor: '#00DB00',
strokeOpacity: 1.0,
strokeWeight: 3,
fillColor: 'green',
fillOpacity: 0.05 //Increase this to make the green background darker
});
poly.setMap(map);
Run Code Online (Sandbox Code Playgroud)
新小提琴:https://jsfiddle.net/c3znthny/1/
| 归档时间: |
|
| 查看次数: |
1582 次 |
| 最近记录: |