From 0577bbc1a1aae93a6b7c4178b160b8a8235d8516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 14 Mar 2014 09:32:25 +0100 Subject: [PATCH] Make Geolocation dispatch change events --- src/ol/geolocation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/geolocation.js b/src/ol/geolocation.js index 0a1e621024..7636afa812 100644 --- a/src/ol/geolocation.js +++ b/src/ol/geolocation.js @@ -44,7 +44,7 @@ ol.GeolocationProperty = { * // take the projection to use from the map's view * geolocation.bindTo('projection', map.getView()); * // listen to changes in position - * geolocation.on('change:position', function(evt) { + * geolocation.on('change', function(evt) { * window.console.log(geolocation.getPosition()); * }); * @@ -186,10 +186,10 @@ ol.Geolocation.prototype.positionChange_ = function(position) { this.set(ol.GeolocationProperty.POSITION, projectedPosition); this.set(ol.GeolocationProperty.SPEED, goog.isNull(coords.speed) ? undefined : coords.speed); - var geometry = ol.sphere.WGS84.circle(this.position_, coords.accuracy); geometry.transform(this.transform_); this.set(ol.GeolocationProperty.ACCURACY_GEOMETRY, geometry); + this.dispatchChangeEvent(); };