Don't rely on ol.style.DefaultStyleFunction in GeoJSON example

This commit is contained in:
Tom Payne
2013-11-12 17:53:00 +01:00
parent 90bc88082a
commit 9a0ea25f7e

View File

@@ -9,7 +9,6 @@ goog.require('ol.layer.Vector');
goog.require('ol.shape');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');
goog.require('ol.style.DefaultStyleFunction');
var image = ol.shape.renderCircle(5, null, {color: 'red', width: 1});
@@ -47,7 +46,15 @@ var styleFunction = function(feature) {
}
};
default:
return ol.style.DefaultStyleFunction(feature);
return {
stroke: {
color: 'red',
width: 2
},
fill: {
color: 'rgba(255, 0, 0, 0.1)'
}
};
}
};