rename zoomPanTo to flyTo

This commit is contained in:
Vladimir Agafonkin 2014-07-30 17:40:44 +03:00
parent 7a75d07d89
commit 70923e6604
3 changed files with 6 additions and 6 deletions

View File

@ -237,7 +237,7 @@ var deps = {
AnimationZoom: { AnimationZoom: {
src: [ src: [
'map/anim/Map.ZoomAnimation.js', 'map/anim/Map.ZoomAnimation.js',
'map/anim/Map.ZoomPan.js' 'map/anim/Map.FlyTo.js'
], ],
deps: ['AnimationPan'], deps: ['AnimationPan'],
desc: 'Smooth zooming animation. Works only on browsers that support CSS3 Transitions.' desc: 'Smooth zooming animation. Works only on browsers that support CSS3 Transitions.'

View File

@ -49,11 +49,11 @@
// marker3 = L.marker(dc).addTo(map), // marker3 = L.marker(dc).addTo(map),
// marker4 = L.marker(sf).addTo(map); // marker4 = L.marker(sf).addTo(map);
document.getElementById('dc').onclick = function () { map.zoomPanTo(dc, 10); }; document.getElementById('dc').onclick = function () { map.flyTo(dc, 10); };
document.getElementById('sf').onclick = function () { map.zoomPanTo(sf, 10); }; document.getElementById('sf').onclick = function () { map.flyTo(sf, 10); };
document.getElementById('stop').onclick = function () { map.stop(); }; document.getElementById('stop').onclick = function () { map.stop(); };
// document.getElementById('london').onclick = function () { map.zoomPanTo(london); }; // document.getElementById('london').onclick = function () { map.flyTo(london); };
// document.getElementById('kyiv').onclick = function () { map.zoomPanTo(kyiv); }; // document.getElementById('kyiv').onclick = function () { map.flyTo(kyiv); };
function logEvent(e) { console.log(e.type); } function logEvent(e) { console.log(e.type); }

View File

@ -1,6 +1,6 @@
L.Map.include({ L.Map.include({
zoomPanTo: function (targetCenter, targetZoom) { flyTo: function (targetCenter, targetZoom) {
this.stop(); this.stop();