I am using the "styleFunction" from the following example: http://openlayers.org/en/v3.9.0/examples/geojson.html
var styleFunction = function(feature, resolution){ var properties = feature.getProperties(); var type = feature.getGeometry().getType(); switch (type) { case 'Point': ...return some styling... break; case 'Polygon': ...return some styling... break; }} I am currently using only the "feature" from the callback. I can't seem to find documentation about this function on Openlayers.org so I ask here:
Are there more variables available for callback and is there a way to find out without documentation?
(I need to know the layer name the function is styling, and I can't get that from the feature alone.)
أكثر...
var styleFunction = function(feature, resolution){ var properties = feature.getProperties(); var type = feature.getGeometry().getType(); switch (type) { case 'Point': ...return some styling... break; case 'Polygon': ...return some styling... break; }} I am currently using only the "feature" from the callback. I can't seem to find documentation about this function on Openlayers.org so I ask here:
Are there more variables available for callback and is there a way to find out without documentation?
(I need to know the layer name the function is styling, and I can't get that from the feature alone.)
أكثر...