Use style option in vector layer examples

Providing a styleFunction option still works because the layer property is still named styleFunction.
This commit is contained in:
Tim Schaub
2014-02-07 10:43:19 -07:00
parent 5c21f24df5
commit 1072f6dfa7
16 changed files with 44 additions and 61 deletions

View File

@@ -30,7 +30,7 @@ var vector = new ol.layer.Vector({
projection: 'EPSG:3857',
url: 'data/topojson/world-110m.json'
}),
styleFunction: function(feature, resolution) {
style: function(feature, resolution) {
// don't want to render the full world polygon, which repeats all countries
return feature.getId() !== undefined ? styleArray : null;
}