Change ol.Object event name syntax
'changed' to 'change' and '<attribute>_changed' to 'change:<attribute>'.
This commit is contained in:
@@ -31,7 +31,7 @@ var marker = new ol.Overlay({
|
||||
// bind the marker position to the device location.
|
||||
marker.bindTo('position', geolocation);
|
||||
|
||||
geolocation.addEventListener('accuracy_changed', function() {
|
||||
geolocation.on('change:accuracy', function() {
|
||||
$(marker.getElement()).tooltip({
|
||||
title: this.getAccuracy() + 'm from this point'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user