Fix typo in example.
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<button id="pan-to-london">Pan to London</button>
|
<button id="pan-to-london">Pan to London</button>
|
||||||
<button id="elastic-to-moscow">Elastic to Moscow</button>
|
<button id="elastic-to-moscow">Elastic to Moscow</button>
|
||||||
<button id="bounce-to-instanbul">Bounce to Instanbul</button>
|
<button id="bounce-to-istanbul">Bounce to Istanbul</button>
|
||||||
<button id="spin-to-rome">Spin to Rome</button>
|
<button id="spin-to-rome">Spin to Rome</button>
|
||||||
<button id="fly-to-bern">Fly to Bern</button>
|
<button id="fly-to-bern">Fly to Bern</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ var london = ol.projection.transform(
|
|||||||
new ol.Coordinate(-0.12755, 51.507222), 'EPSG:4326', 'EPSG:3857');
|
new ol.Coordinate(-0.12755, 51.507222), 'EPSG:4326', 'EPSG:3857');
|
||||||
var moscow = ol.projection.transform(
|
var moscow = ol.projection.transform(
|
||||||
new ol.Coordinate(37.6178, 55.7517), 'EPSG:4326', 'EPSG:3857');
|
new ol.Coordinate(37.6178, 55.7517), 'EPSG:4326', 'EPSG:3857');
|
||||||
var instanbul = ol.projection.transform(
|
var istanbul = ol.projection.transform(
|
||||||
new ol.Coordinate(28.9744, 41.0128), 'EPSG:4326', 'EPSG:3857');
|
new ol.Coordinate(28.9744, 41.0128), 'EPSG:4326', 'EPSG:3857');
|
||||||
var rome = ol.projection.transform(
|
var rome = ol.projection.transform(
|
||||||
new ol.Coordinate(12.5, 41.9), 'EPSG:4326', 'EPSG:3857');
|
new ol.Coordinate(12.5, 41.9), 'EPSG:4326', 'EPSG:3857');
|
||||||
@@ -30,7 +30,7 @@ var map = new ol.Map({
|
|||||||
renderers: ol.RendererHints.createFromQueryData(),
|
renderers: ol.RendererHints.createFromQueryData(),
|
||||||
target: 'map',
|
target: 'map',
|
||||||
view: new ol.View2D({
|
view: new ol.View2D({
|
||||||
center: instanbul,
|
center: istanbul,
|
||||||
zoom: 6
|
zoom: 6
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -75,15 +75,15 @@ elasticToMoscow.addEventListener('click', function() {
|
|||||||
map.getView().getView2D().setCenter(moscow);
|
map.getView().getView2D().setCenter(moscow);
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
var bounceToInstanbul = document.getElementById('bounce-to-instanbul');
|
var bounceToIstanbul = document.getElementById('bounce-to-istanbul');
|
||||||
bounceToInstanbul.addEventListener('click', function() {
|
bounceToIstanbul.addEventListener('click', function() {
|
||||||
var pan = ol.animation.pan({
|
var pan = ol.animation.pan({
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
easing: ol.easing.bounce,
|
easing: ol.easing.bounce,
|
||||||
source: map.getView().getView2D().getCenter()
|
source: map.getView().getView2D().getCenter()
|
||||||
});
|
});
|
||||||
map.addPreRenderFunction(pan);
|
map.addPreRenderFunction(pan);
|
||||||
map.getView().getView2D().setCenter(instanbul);
|
map.getView().getView2D().setCenter(istanbul);
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
var spinToRome = document.getElementById('spin-to-rome');
|
var spinToRome = document.getElementById('spin-to-rome');
|
||||||
|
|||||||
Reference in New Issue
Block a user