diff --git a/CHANGELOG.md b/CHANGELOG.md index a469fa6d..5571b757 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Leaflet Changelog * Added ability to add a tile layer below all others (`map.addLayer(layer, true)`) (useful for switching base tile layers). * Added `hasLayer` method to `Map`. * Added `TileLayer` `continuousWorld` option to disable tile coordinates checking/wrapping. + * Added `Map` `zoomstart` event (thanks to [@Fabiz](https://github.com/Fabiz)). [#377](https://github.com/CloudMade/Leaflet/pull/377) * Added `ImageOverlay` `load` event. [#213](https://github.com/CloudMade/Leaflet/issues/213) * Added `Polyline` `closestLayerPoint` method that's can be useful for interaction features (by [@anru](https://github.com/anru)). [#186](https://github.com/CloudMade/Leaflet/pull/186) * Added `setLatLngs` method to `MultiPolyline` and `MultiPolygon` (by [@anru](https://github.com/anru)). [#194](https://github.com/CloudMade/Leaflet/pull/194) @@ -64,6 +65,7 @@ Leaflet Changelog * Fixed a typo in `Bounds` `contains` method (by [@anru](https://github.com/anru)). [#180](https://github.com/CloudMade/Leaflet/pull/180) * Fixed a bug where drag event fired before the actual movement of layer (by [@anru](https://github.com/anru)). [#197](https://github.com/CloudMade/Leaflet/pull/197) * Fixed a bug where map click caused an error if dragging is initially disabled. [#196](https://github.com/CloudMade/Leaflet/issues/196) + * Fixed a bug where map `movestart` event would fire after zoom animation. * Fixed a bug where attribution prefix would not update on `setPrefix`. [#195](https://github.com/CloudMade/Leaflet/issues/195) * Fixed a bug where `TileLayer` `load` event wouldn't fire in some edge cases (by [@dravnic](https://github.com/dravnic)). * Fixed a bug related to clearing background tiles after zooming (by [@neno-giscloud](https://github.com/neno-giscloud) & [@dravnic](https://github.com/dravnic)). diff --git a/debug/map/map.html b/debug/map/map.html index d0718773..0acc7694 100644 --- a/debug/map/map.html +++ b/debug/map/map.html @@ -5,9 +5,9 @@ - + - +
@@ -21,25 +21,34 @@ cloudmadeAttribution = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade', cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}), latlng = new L.LatLng(50.5, 30.51); - + var map = new L.Map('map', {center: latlng, zoom: 15, layers: [cloudmade]}); - + var markers = new L.FeatureGroup(); - + function populate() { for (var i = 0; i < 10; i++) { markers.addLayer(new L.Marker(getRandomLatLng(map))); } return false; - }; + } markers.bindPopup("Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.
Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque.
"); - + map.addLayer(markers); - + populate(); L.DomUtil.get('populate').onclick = populate; - + +// function logEvent(e) { console.log(e.type); } +// +// map.on('movestart', logEvent); +// map.on('move', logEvent); +// map.on('moveend', logEvent); +// +// map.on('zoomstart', logEvent); +// map.on('zoomend', logEvent); + -