Give feature overlays a style option

This commit is contained in:
Tim Schaub
2014-02-07 12:52:41 -07:00
parent b309c44020
commit 6abb691224
6 changed files with 51 additions and 40 deletions

View File

@@ -64,7 +64,7 @@ var highlightStyleCache = {};
var featureOverlay = new ol.FeatureOverlay({
map: map,
styleFunction: function(feature, resolution) {
style: function(feature, resolution) {
var text = resolution < 5000 ? feature.get('name') : '';
if (!highlightStyleCache[text]) {
highlightStyleCache[text] = [new ol.style.Style({