minor changelog update

This commit is contained in:
mourner 2011-12-15 12:20:09 +02:00
parent 83230666af
commit dd42662a42
3 changed files with 14 additions and 22 deletions

View File

@ -22,16 +22,12 @@ Leaflet Changelog
#### API improvements #### API improvements
##### Map
* Added ability to add a tile layer below all others (`map.addLayer(layer, true)`) (useful for switching base tile layers). * Added ability to add a tile layer below all others (`map.addLayer(layer, true)`) (useful for switching base tile layers).
* Added `Map` `zoomstart` event (thanks to [@Fabiz](https://github.com/Fabiz)). [#377](https://github.com/CloudMade/Leaflet/pull/377) * Added `Map` `zoomstart` event (thanks to [@Fabiz](https://github.com/Fabiz)). [#377](https://github.com/CloudMade/Leaflet/pull/377)
* Improved `Map` `locate` method, added ability to watch location continuously and more options. [#212](https://github.com/CloudMade/Leaflet/issues/212) * Improved `Map` `locate` method, added ability to watch location continuously and more options. [#212](https://github.com/CloudMade/Leaflet/issues/212)
* Added second argument `inside` to `Map` `getBoundsZoom` method that allows you to get appropriate zoom for the view to fit *inside* the given bounds. * Added second argument `inside` to `Map` `getBoundsZoom` method that allows you to get appropriate zoom for the view to fit *inside* the given bounds.
* Added `hasLayer` method to `Map`. * Added `hasLayer` method to `Map`.
##### Layers
* Added `urlParams` third optional argument to `TileLayer` constructor for convenience: an object with properties that will be evaluated in the URL template. * Added `urlParams` third optional argument to `TileLayer` constructor for convenience: an object with properties that will be evaluated in the URL template.
* Added `TileLayer` `continuousWorld` option to disable tile coordinates checking/wrapping. * Added `TileLayer` `continuousWorld` option to disable tile coordinates checking/wrapping.
* Added `TileLayer` `tileunload` event fired when tile gets removed after panning (by [@CodeJosch](https://github.com/CodeJosch)). [#256](https://github.com/CloudMade/Leaflet/pull/256) * Added `TileLayer` `tileunload` event fired when tile gets removed after panning (by [@CodeJosch](https://github.com/CodeJosch)). [#256](https://github.com/CloudMade/Leaflet/pull/256)
@ -42,14 +38,10 @@ Leaflet Changelog
* Added `ImageOverlay` `load` event. [#213](https://github.com/CloudMade/Leaflet/issues/213) * Added `ImageOverlay` `load` event. [#213](https://github.com/CloudMade/Leaflet/issues/213)
* Added `minWidth` option to `Popup` (by [@marphi](https://github.com/marphi)). [#214](https://github.com/CloudMade/Leaflet/pull/214) * Added `minWidth` option to `Popup` (by [@marphi](https://github.com/marphi)). [#214](https://github.com/CloudMade/Leaflet/pull/214)
##### Basic types
* Improved `LatLng` constructor to be more tolerant (and throw descriptive error if latitude or longitude can't be interpreted as a number). [#136](https://github.com/CloudMade/Leaflet/issues/136) * Improved `LatLng` constructor to be more tolerant (and throw descriptive error if latitude or longitude can't be interpreted as a number). [#136](https://github.com/CloudMade/Leaflet/issues/136)
* Added `LatLngBounds` `toBBoxString` method for convenience (by [@JasonSanford](https://github.com/JasonSanford)). [#263](https://github.com/CloudMade/Leaflet/pull/263) * Added `LatLngBounds` `toBBoxString` method for convenience (by [@JasonSanford](https://github.com/JasonSanford)). [#263](https://github.com/CloudMade/Leaflet/pull/263)
* Added `LatLngBounds` `intersects(otherBounds)` method (thanks to [@pagameba](https://github.com/pagameba)). [#350](https://github.com/CloudMade/Leaflet/pull/350) * Added `LatLngBounds` `intersects(otherBounds)` method (thanks to [@pagameba](https://github.com/pagameba)). [#350](https://github.com/CloudMade/Leaflet/pull/350)
##### Misc. improvements
* Added `L.Util.template` method for simple string template evaluation. * Added `L.Util.template` method for simple string template evaluation.
* Added `DomUtil.removeClass` method (by [@anru](https://github.com/anru)). * Added `DomUtil.removeClass` method (by [@anru](https://github.com/anru)).
* Improved browser-specific code to rely more on feature detection rather than user agent string. * Improved browser-specific code to rely more on feature detection rather than user agent string.

View File

@ -43,7 +43,7 @@ var geojsonSample = {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "MultiPolygon", "type": "MultiPolygon",
"coordinates": [[[[100.0, 1.5], [100.5, 1.5], [100.5, 2.0], [100.0, 2.0], [100.0, 1.5]]], [[[100.5, 2.0], [100.5, 2.5], [101.0, 2.5], [101.0, 2.0], [100.5, 2.0]]]] "coordinates": [[[[-151.875,-14.0625],[-146.25,-14.0625],[-146.25,-11.25],[-151.875,-11.25],[-151.875,-14.0625]]],[[[-180,-5.625],[-174.375,-5.625],[-174.375,-2.8125],[-180,-2.8125],[-180,-5.625]]],[[[-174.375,-5.625],[-168.75,-5.625],[-168.75,-2.8125],[-174.375,-2.8125],[-174.375,-5.625]]],[[[-174.375,-2.8125],[-168.75,-2.8125],[-168.75,0],[-174.375,0],[-174.375,-2.8125]]],[[[-151.875,-11.25],[-146.25,-11.25],[-146.25,-8.4375],[-151.875,-8.4375],[-151.875,-11.25]]],[[[-157.5,-8.4375],[-151.875,-8.4375],[-151.875,-5.625],[-157.5,-5.625],[-157.5,-8.4375]]],[[[-157.5,-5.625],[-151.875,-5.625],[-151.875,-2.8125],[-157.5,-2.8125],[-157.5,-5.625]]],[[[101.25,-8.4375],[106.875,-8.4375],[106.875,-5.625],[101.25,-5.625],[101.25,-8.4375]]],[[[106.875,-8.4375],[112.5,-8.4375],[112.5,-5.625],[106.875,-5.625],[106.875,-8.4375]]],[[[101.25,-5.625],[112.5,-5.625],[112.5,0],[101.25,0],[101.25,-5.625]]],[[[112.5,-8.4375],[118.125,-8.4375],[118.125,-5.625],[112.5,-5.625],[112.5,-8.4375]]],[[[118.125,-8.4375],[123.75,-8.4375],[123.75,-5.625],[118.125,-5.625],[118.125,-8.4375]]],[[[129.375,-11.25],[135,-11.25],[135,-8.4375],[129.375,-8.4375],[129.375,-11.25]]],[[[123.75,-8.4375],[129.375,-8.4375],[129.375,-5.625],[123.75,-5.625],[123.75,-8.4375]]],[[[129.375,-8.4375],[135,-8.4375],[135,-5.625],[129.375,-5.625],[129.375,-8.4375]]],[[[112.5,-5.625],[123.75,-5.625],[123.75,0],[112.5,0],[112.5,-5.625]]],[[[123.75,-5.625],[135,-5.625],[135,0],[123.75,0],[123.75,-5.625]]],[[[135,-11.25],[140.625,-11.25],[140.625,-8.4375],[135,-8.4375],[135,-11.25]]],[[[140.625,-11.25],[146.25,-11.25],[146.25,-8.4375],[140.625,-8.4375],[140.625,-11.25]]],[[[135,-8.4375],[140.625,-8.4375],[140.625,-5.625],[135,-5.625],[135,-8.4375]]],[[[135,-5.625],[140.625,-5.625],[140.625,-2.8125],[135,-2.8125],[135,-5.625]]],[[[135,-2.8125],[140.625,-2.8125],[140.625,0],[135,0],[135,-2.8125]]],[[[140.625,-2.8125],[146.25,-2.8125],[146.25,0],[140.625,0],[140.625,-2.8125]]],[[[168.75,-2.8125],[174.375,-2.8125],[174.375,0],[168.75,0],[168.75,-2.8125]]],[[[174.375,-2.8125],[180,-2.8125],[180,0],[174.375,0],[174.375,-2.8125]]],[[[-180,0],[-135,0],[-135,22.5],[-180,22.5],[-180,0]]],[[[-135,0],[-90,0],[-90,22.5],[-135,22.5],[-135,0]]],[[[-180,22.5],[-135,22.5],[-135,45],[-180,45],[-180,22.5]]],[[[-135,22.5],[-112.5,22.5],[-112.5,33.75],[-135,33.75],[-135,22.5]]],[[[-112.5,22.5],[-101.25,22.5],[-101.25,28.125],[-112.5,28.125],[-112.5,22.5]]],[[[-135,33.75],[-123.75,33.75],[-123.75,39.375],[-135,39.375],[-135,33.75]]],[[[-123.75,33.75],[-112.5,33.75],[-112.5,39.375],[-123.75,39.375],[-123.75,33.75]]],[[[-135,39.375],[-123.75,39.375],[-123.75,45],[-135,45],[-135,39.375]]],[[[-90,0],[-67.5,0],[-67.5,11.25],[-90,11.25],[-90,0]]],[[[-90,11.25],[-78.75,11.25],[-78.75,16.875],[-90,16.875],[-90,11.25]]],[[[-180,45],[-157.5,45],[-157.5,56.25],[-180,56.25],[-180,45]]],[[[-157.5,45],[-135,45],[-135,56.25],[-157.5,56.25],[-157.5,45]]],[[[-168.75,56.25],[-157.5,56.25],[-157.5,61.875],[-168.75,61.875],[-168.75,56.25]]],[[[-157.5,56.25],[-146.25,56.25],[-146.25,61.875],[-157.5,61.875],[-157.5,56.25]]],[[[-146.25,56.25],[-135,56.25],[-135,61.875],[-146.25,61.875],[-146.25,56.25]]],[[[-135,45],[-123.75,45],[-123.75,50.625],[-135,50.625],[-135,45]]],[[[-135,50.625],[-123.75,50.625],[-123.75,56.25],[-135,56.25],[-135,50.625]]],[[[-135,56.25],[-123.75,56.25],[-123.75,61.875],[-135,61.875],[-135,56.25]]],[[[-11.25,50.625],[0,50.625],[0,56.25],[-11.25,56.25],[-11.25,50.625]]],[[[101.25,0],[112.5,0],[112.5,5.625],[101.25,5.625],[101.25,0]]],[[[101.25,5.625],[112.5,5.625],[112.5,11.25],[101.25,11.25],[101.25,5.625]]],[[[112.5,0],[135,0],[135,11.25],[112.5,11.25],[112.5,0]]],[[[101.25,11.25],[112.5,11.25],[112.5,16.875],[101.25,16.875],[101.25,11.25]]],[[[101.25,16.875],[112.5,16.875],[112.5,22.5],[101.25,22.5],[101.25,16.875]]],[[[112.5,11.25],[135,11.25],[135,22.5],[112.5,22.5],[112.5,11.25]]],[[[135,0],[180,0],[180,22.5],[135,22.5],[135,0]]],[[[112.5,22.5],[123.75,22.5],[123.75,28.125],[112.5,28.125],[112.5,22.5]]],[[[123.75,22.5],[135,22.5],[135,28.125],[123.75,28.125],[123.75,22.5]]],[[[123.75,28.125],[135,28.125],[135,33.75],[123.75,33.75],[123.75,28.125]]],[[[123.75,33.75],[135,33.75],[135,39.375],[123.75,39.375],[123.75,33.75]]],[[[135,22.5],[180,22.5],[180,45],[135,45],[135,22.5]]],[[[146.25,45],[157.5,45],[157.5,50.625],[146.25,50.625],[146.25,45]]],[[[146.25,50.625],[157.5,50.625],[157.5,56.25],[146.25,56.25],[146.25,50.625]]],[[[157.5,45],[180,45],[180,56.25],[157.5,56.25],[157.5,45]]]]
} }
} }
] ]

View File

@ -5,9 +5,9 @@
<link rel="stylesheet" href="../../dist/leaflet.css" /> <link rel="stylesheet" href="../../dist/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]--> <!--[if lte IE 8]><link rel="stylesheet" href="../../dist/leaflet.ie.css" /><![endif]-->
<link rel="stylesheet" href="../css/screen.css" /> <link rel="stylesheet" href="../css/screen.css" />
<script src="../leaflet-include.js"></script> <script src="../leaflet-include.js"></script>
</head> </head>
<body> <body>
@ -21,23 +21,23 @@
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png', var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png',
cloudmadeAttribution = 'Map data &copy; 2011 OpenStreetMap contributors, Imagery &copy; 2011 CloudMade', cloudmadeAttribution = 'Map data &copy; 2011 OpenStreetMap contributors, Imagery &copy; 2011 CloudMade',
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution}); cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttribution});
var map = new L.Map('map', { var map = new L.Map('map', {
center: new L.LatLng(0.78, 102.37), center: new L.LatLng(0.78, 0.37),
zoom: 7, zoom: 1,
layers: [cloudmade] layers: [cloudmade]
}); });
var geojson = new L.GeoJSON(); var geojson = new L.GeoJSON();
/* points are rendered as markers by default, but you can change this: /* points are rendered as markers by default, but you can change this:
var geojson = new L.GeoJSON(null, { var geojson = new L.GeoJSON(null, {
pointToLayer: function(latlng) { return new L.CircleMarker(latlng); } pointToLayer: function(latlng) { return new L.CircleMarker(latlng); }
}); });
*/ */
geojson.on('featureparse', function(e) { geojson.on('featureparse', function(e) {
// you can style features depending on their properties, etc. // you can style features depending on their properties, etc.
var popupText = 'geometry type: ' + e.geometryType; var popupText = 'geometry type: ' + e.geometryType;
@ -47,10 +47,10 @@
} }
e.layer.bindPopup(popupText); e.layer.bindPopup(popupText);
}); });
geojson.addGeoJSON(geojsonSample); geojson.addGeoJSON(geojsonSample);
map.addLayer(geojson); map.addLayer(geojson);
</script> </script>
</body> </body>
</html> </html>