Only set center once in mobile full screen example
This commit is contained in:
@@ -29,7 +29,7 @@ var geolocation = new ol.Geolocation({
|
|||||||
tracking: true
|
tracking: true
|
||||||
});
|
});
|
||||||
geolocation.bindTo('projection', view);
|
geolocation.bindTo('projection', view);
|
||||||
geolocation.on('position_changed', function() {
|
geolocation.onOnce('position_changed', function() {
|
||||||
view.setCenter(geolocation.getPosition());
|
view.setCenter(geolocation.getPosition());
|
||||||
view.setResolution(2.388657133911758);
|
view.setResolution(2.388657133911758);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user