From 9a0ea25f7e4d780a4a4c15a96a210b42596cef00 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 12 Nov 2013 17:53:00 +0100 Subject: [PATCH] Don't rely on ol.style.DefaultStyleFunction in GeoJSON example --- examples/geojson.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/geojson.js b/examples/geojson.js index 69d074f6fc..c915a6013e 100644 --- a/examples/geojson.js +++ b/examples/geojson.js @@ -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)' + } + }; } };