/* @preserve
- * Leaflet 1.3.2, a JS library for interactive maps. http://leafletjs.com
+ * Leaflet 1.3.4, a JS library for interactive maps. http://leafletjs.com
* (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
(factory((global.L = {})));
}(this, (function (exports) { 'use strict';
-var version = "1.3.2";
+var version = "1.3.4";
/*
* @namespace Util
// @property TRANSFORM: String
// Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit).
var TRANSFORM = testProp(
- ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform']);
+ ['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform']);
// webkitTransition comes first because some browser versions that drop vendor prefix don't do
// the same for the transitionend event, in particular the Android 4.1 stock browser
Map.addInitHook(function () {
if (this.options.zoomControl) {
+ // @section Controls
+ // @property zoomControl: Control.Zoom
+ // The default zoom control (only available if the
+ // [`zoomControl` option](#map-zoomcontrol) was `true` when creating the map).
this.zoomControl = new Zoom();
this.addControl(this.zoomControl);
}
options: {
popupAnchor: [0, 0],
- tooltipAnchor: [0, 0],
+ tooltipAnchor: [0, 0]
},
initialize: function (options) {
// Option inherited from "Interactive layer" abstract class
interactive: true,
- // @option draggable: Boolean = false
- // Whether the marker is draggable with mouse/touch or not.
- draggable: false,
-
- // @option autoPan: Boolean = false
- // Set it to `true` if you want the map to do panning animation when marker hits the edges.
- autoPan: false,
-
- // @option autoPanPadding: Point = Point(50, 50)
- // Equivalent of setting both top left and bottom right autopan padding to the same value.
- autoPanPadding: [50, 50],
-
- // @option autoPanSpeed: Number = 10
- // Number of pixels the map should move by.
- autoPanSpeed: 10,
-
// @option keyboard: Boolean = true
// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.
keyboard: true,
// @option bubblingMouseEvents: Boolean = false
// When `true`, a mouse event on this marker will trigger the same event on the map
// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).
- bubblingMouseEvents: false
+ bubblingMouseEvents: false,
+
+ // @section Draggable marker options
+ // @option draggable: Boolean = false
+ // Whether the marker is draggable with mouse/touch or not.
+ draggable: false,
+
+ // @option autoPan: Boolean = false
+ // Whether to pan the map when dragging this marker near its edge or not.
+ autoPan: false,
+
+ // @option autoPanPadding: Point = Point(50, 50)
+ // Distance (in pixels to the left/right and to the top/bottom) of the
+ // map edge to start panning the map.
+ autoPanPadding: [50, 50],
+
+ // @option autoPanSpeed: Number = 10
+ // Number of pixels the map should pan by.
+ autoPanSpeed: 10
},
/* @section
errorOverlayUrl: '',
// @option zIndex: Number = 1
- // The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the tile layer.
+ // The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the overlay layer.
zIndex: 1,
// @option className: String = ''
// A custom class name to assign to the image. Empty by default.
- className: '',
+ className: ''
},
initialize: function (url, bounds, options) { // (String, LatLngBounds, Object)
return events;
},
- // @method: setZIndex(value: Number) : this
+ // @method setZIndex(value: Number): this
// Changes the [zIndex](#imageoverlay-zindex) of the image overlay.
setZIndex: function (value) {
this.options.zIndex = value;
_overlayOnError: function () {
// @event error: Event
- // Fired when the ImageOverlay layer has loaded its image
+ // Fired when the ImageOverlay layer fails to load its image
this.fire('error');
var errorUrl = this.options.errorOverlayUrl;
var tile = this._tiles[key];
if (!tile) { return; }
- // Cancels any pending http requests associated with the tile
- // unless we're on Android's stock browser,
- // see https://github.com/Leaflet/Leaflet/issues/137
- if (!androidStock) {
- tile.el.setAttribute('src', emptyImageUrl);
- }
remove(tile.el);
delete this._tiles[key];
},
_tileReady: function (coords, err, tile) {
- if (!this._map || tile.getAttribute('src') === emptyImageUrl) { return; }
-
if (err) {
// @event tileerror: TileErrorEvent
// Fired when there is an error loading a tile.
}
}
}
+ },
+
+ _removeTile: function (key) {
+ var tile = this._tiles[key];
+ if (!tile) { return; }
+
+ // Cancels any pending http requests associated with the tile
+ // unless we're on Android's stock browser,
+ // see https://github.com/Leaflet/Leaflet/issues/137
+ if (!androidStock) {
+ tile.el.setAttribute('src', emptyImageUrl);
+ }
+
+ return GridLayer.prototype._removeTile.call(this, key);
+ },
+
+ _tileReady: function (coords, err, tile) {
+ if (!this._map || (tile && tile.getAttribute('src') === emptyImageUrl)) {
+ return;
+ }
+
+ return GridLayer.prototype._tileReady.call(this, coords, err, tile);
}
});
_updateDashArray: function (layer) {
if (typeof layer.options.dashArray === 'string') {
- var parts = layer.options.dashArray.split(','),
+ var parts = layer.options.dashArray.split(/[, ]+/),
dashArray = [],
i;
for (i = 0; i < parts.length; i++) {