1
我想在每個多邊形上設置樣式,特別是填充顏色。 我知道我能做到這一點:谷歌地圖GeoJson造型
map.data.loadGeoJson('http://localhost:8080/my.json');
map.data.setStyle({
fillColor: 'red'
});
但我想設置單獨填補多邊形的顏色。我嘗試以下this answer on GIS Stack設置,但它不工作:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-80.4545,
43.5061
]
]
]
},
"style":{
"fill":"red",
"stroke-weight": "1",
"stroke-width":"3",
"fill-opacity":"0.6"
}
}
]
}
我希望它可以設置個人多邊形的造型,而不是整個數據。
這幫助我,謝謝。 – mapr 2015-03-26 21:10:14