end
folder 'leaflet' do
- file 'leaflet.js', 'https://unpkg.com/leaflet@1.0.0/dist/leaflet-src.js'
- file 'leaflet.css', 'https://unpkg.com/leaflet@1.0.0/dist/leaflet.css'
+ file 'leaflet.js', 'https://unpkg.com/leaflet@1.0.1/dist/leaflet-src.js'
+ file 'leaflet.css', 'https://unpkg.com/leaflet@1.0.1/dist/leaflet.css'
[ 'layers.png', 'layers-2x.png',
'marker-icon.png', 'marker-icon-2x.png',
'marker-shadow.png' ].each do |image|
- file "images/#{image}", "https://unpkg.com/leaflet@1.0.0/dist/images/#{image}"
+ file "images/#{image}", "https://unpkg.com/leaflet@1.0.1/dist/images/#{image}"
end
from 'git://github.com/kajic/leaflet-locationfilter.git' do
/*
- Leaflet 1.0.0, a JS library for interactive maps. http://leafletjs.com
+ Leaflet 1.0.1, a JS library for interactive maps. http://leafletjs.com
(c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
(function (window, document, undefined) {
var L = {
- version: "1.0.0"
+ version: "1.0.1"
};
function expose() {
});
if (queue.length !== 0) {
- // if its the first batch of tiles to load
+ // if it's the first batch of tiles to load
if (!this._loading) {
this._loading = true;
// @event loading: Event
this._pruneTiles();
}
- L.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');
+ if (!err) {
+ L.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');
- // @event tileload: TileEvent
- // Fired when a tile loads.
- this.fire('tileload', {
- tile: tile.el,
- coords: coords
- });
+ // @event tileload: TileEvent
+ // Fired when a tile loads.
+ this.fire('tileload', {
+ tile: tile.el,
+ coords: coords
+ });
+ }
if (this._noTilesToLoad()) {
this._loading = false;
document.body.removeChild(el);
return path.indexOf('url') === 0 ?
- path.replace(/^url\([\"\']?/, '').replace(/[\"\']?\)$/, '') : '';
+ path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '') : '';
}
});
* @example
*
* ```js
- * L.circle([50.5, 30.5], 200).addTo(map);
+ * L.circle([50.5, 30.5], {radius: 200}).addTo(map);
* ```
*/
_update: function () {
if (this._map._animatingZoom) { return; }
L.Renderer.prototype._update.call(this);
+ this.fire('update');
},
_initPath: function (layer) {
* ```
*
* @option filter: Function = *
- * A `Function` that will be used to decide whether to show a feature or not.
- * The default is to show all features:
+ * A `Function` that will be used to decide whether to include a feature or not.
+ * The default is to include all features:
* ```js
* function (geoJsonFeature) {
* return true;
* }
* ```
+ * Note: dynamically changing the `filter` option will have effect only on newly
+ * added data. It will _not_ re-evaluate already included features.
*
* @option coordsToLatLng: Function = *
* A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.
}
},
- // @function addData( <GeoJSON> data ): Layer
+ // @method addData( <GeoJSON> data ): Layer
// Adds a GeoJSON object to the layer.
addData: function (geojson) {
var features = L.Util.isArray(geojson) ? geojson : geojson.features,
return this.addLayer(layer);
},
- // @function resetStyle( <Path> layer ): Layer
+ // @method resetStyle( <Path> layer ): Layer
// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.
resetStyle: function (layer) {
// reset any custom styles
return this;
},
- // @function setStyle( <Function> style ): Layer
+ // @method setStyle( <Function> style ): Layer
// Changes styles of GeoJSON vector layers with the given style function.
setStyle: function (style) {
return this.eachLayer(function (layer) {