Hey,
maybe this issue correlate with issue 51
I would like to style more than one polygons/feature in one layer individually. When i use inline GeoJSON, i only can set the style attribute on the same level as the source object.
In this case:
var myLayer = {
name: 'example',
source: {
type: "GeoJSON",
geojson: {
object: {
type : "FeatureCollection",
features: [
{
type: "Feature",
id: "clicklayer",
geometry: {
"type": "Polygon",
"coordinates": [[...][...]]
}
}
]
},
projection: "EPSG:3857"
}
},
style: {
fill: {
color: "rgba(0, 0, 0, 0)"
},
stroke: {
color: "rgba(0, 0, 0, 0)",
width: 1
}
},
visible: true,
opacity: 0.6
}
but, what i can do if i want to style polygones/features individuelly? To bad that i can't see any example for this case on your demo page (or i haven't seen it yet?)
so, i am searching for something like this:
...
features: [
{
type: "Feature",
id: "clicklayer",
geometry: {
"type": "Polygon",
"coordinates": [[...][...]]
}
style: {
fill: {
color: "rgba(0, 0, 0, 0)"
},
stroke: {
color: "rgba(0, 0, 0, 0)",
width: 1
}
},
visible: true,
opacity: 0.6
}
},
//some more feature types with style option
]
...
I also not need a GeoJSON object. It can be any type, as long as i can set the style attribute individually for polygones or features. You can help me?
best regards
lars