From 722bf3e0b2497591cc0e06d6a79269486f2418b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 18 Dec 2013 22:38:27 +0100 Subject: [PATCH] Example geojson uses ol.style.Circle --- examples/geojson.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/examples/geojson.js b/examples/geojson.js index 1d8aca183a..19a9572977 100644 --- a/examples/geojson.js +++ b/examples/geojson.js @@ -4,16 +4,19 @@ goog.require('ol.RendererHint'); goog.require('ol.View2D'); goog.require('ol.layer.Tile'); goog.require('ol.layer.Vector'); -goog.require('ol.shape'); goog.require('ol.source.GeoJSON'); goog.require('ol.source.OSM'); +goog.require('ol.style.Circle'); goog.require('ol.style.Fill'); goog.require('ol.style.Stroke'); goog.require('ol.style.Style'); -var image = ol.shape.renderCircle(5, null, - new ol.style.Stroke({color: 'red', width: 1})); +var image = new ol.style.Circle({ + radius: 5, + fill: null, + stroke: new ol.style.Stroke({color: 'red', width: 1}) +}); var styles = { 'Point': [new ol.style.Style({ @@ -61,9 +64,13 @@ var styles = { fill: new ol.style.Fill({ color: 'magenta' }), - image: ol.shape.renderCircle(10, null, new ol.style.Stroke({ - color: 'magenta' - })) + image: new ol.style.Circle({ + radius: 10, + fill: null, + stroke: new ol.style.Stroke({ + color: 'magenta' + }) + }) })] };