Only set center once in mobile full screen example

This commit is contained in:
Tom Payne
2013-04-25 16:54:24 +02:00
parent e8109919e9
commit 3643908427

View File

@@ -29,7 +29,7 @@ var geolocation = new ol.Geolocation({
tracking: true
});
geolocation.bindTo('projection', view);
geolocation.on('position_changed', function() {
geolocation.onOnce('position_changed', function() {
view.setCenter(geolocation.getPosition());
view.setResolution(2.388657133911758);
});