Commit Graph

3037 Commits

Author SHA1 Message Date
ghybs
fa374e67a2 Fix(TileLayer.WMS & Canvas): get rid of calls to global L (#6048)
* Fix(TileLayerWMS): get rid of L.TileLayer global call

and rely on imported TileLayer instead.

* Fix(Canvas): get rid of L.stamp global call

and rely on imported Util.stamp instead.
2018-02-12 13:52:10 +01:00
ghybs
870365de4c Fix(MarkerDrag): get rid of L.DomUtil calls (#6047)
* Style(MarkerDrag): fix smart tab indentation

* Fix(MarkerDrag): get rid of L.DomUtil global call

and rely on imported DomUtil instead.
2018-02-12 13:51:37 +01:00
Rich Harris
d188cc5ede add pkg.module (#6021)
* add pkg.module version

* get tests to pass

* export noConflict
2018-02-01 10:42:54 -05:00
louMoxy
3e8e76c790 Fix race condition when removing canvas before it has rendered (#6033)
Fixes #6030: Cancel animation frame request before removing the map.
This fixes the bug where the the delayed call to _redraw is trying to get the drawing context which has already been destroyed.
2018-01-29 15:36:50 +01:00
Andrew
ad8fc9c36b Fix(GridLayer): Do not fire 'tileload' event if tile src is empty image (#6025)
* do not fire 'load' event if tile src is the empty image (i.e. L.Util.emptyImageUrl)

* add TileLayer setUrl test
2018-01-25 11:08:05 +04:00
Mjumbe Poe
34251900ae Respect the preferCanvas option in all panes (#6019)
When creating a renderer for a pane other than overlayPane, use the same logic as default to determine whether to create a canvas or svg renderer.
2018-01-23 19:52:10 +01:00
caleb logan
b2cb8f79e8 Feat(TileLayer+ImageOverlay): add 'use-credentials' CORS Option (#6016)
* Added support for crossorigin using a String besides a Boolean (typically set `crossOrigin: 'use-credentials' / 'anonymous' / '' / true / false (default))

* Changed boolean to result in empty string and updated docs
2018-01-23 16:50:08 +04:00
Andrew
bfbaf6522e Revert "use zoom parameter if passed" (#6006) 2018-01-16 22:10:05 +04:00
Andrew
9796e1183e update docs 2018-01-10 16:33:05 +02:00
Andrew
5c2d3d8ebc move tooltipAnchor and popupAnchor defaults from Marker to Icon 2018-01-10 16:33:05 +02:00
Andrew
031ff12873 document tooltipAnchor option 2018-01-10 16:33:05 +02:00
Andrew
f44ec8f889
Merge pull request #5976 from kring/patch-1
Fix incorrect documentation of off function
2018-01-09 18:58:39 +01:00
Andrew
9fb0df7f04 docs: fix Point's trunc method docs (#5987) 2018-01-08 16:23:11 +01:00
Michael Siadak
f31e39c1ac Set alt HTML attribute only for img-based Markers (#5979) 2018-01-01 11:30:16 +02:00
Kevin Ring
e6f1ab7704
Fix incorrect documentation of off function
#5855 removed some of the incorrect documentation, this removes the rest.
2017-12-22 11:48:03 +11:00
Andrew
572938c741
Merge pull request #5948 from ronikar/master
ImageOverlay accept ImageElement
2017-12-21 13:50:48 +01:00
ghybs
b1e59c9247 Fix(SVGrenderer): reset svgSize on remove from map (#5966)
so that when the SVG Renderer is re-used and re-added on map, in `_update` method, the check on `_svgSize` triggers and re-assigns `width` and `height` attributes on the `_container`. Otherwise, the latter no longer has width and height, therefore is invisible, until the viewport size is changed.
2017-12-19 12:31:46 +01:00
Unknown
cd910249d1 this._url keeps sources after _initImage VideoOverlay 2017-12-09 11:36:20 +02:00
songyumeng
e9ffabdd17 fix wms tilesize (#5958)
* fix wms tilesize as L.point
2017-12-08 20:43:12 +01:00
Unknown
575ced6e2c this._url keep an url after _initImage
updated ImageOverlay and VideoOverlay
2017-12-05 20:51:34 +02:00
Jussi Mattas
f0c31c1691 Use more stable form of Haversine formula. (#5935)
* Use more stable form of Haversine formula.

The new form does not give a non-zero distance from a point to itself.

* Pre-compute sines which are used twice.
2017-12-05 09:11:23 +01:00
Unknown
39c3bf7ed3 ImageOverlay accept ImageElement 2017-12-03 13:20:18 +02:00
germansokolov13
623fa6161e Docs: add mouseup event to interactive layer (#5941) 2017-11-28 09:20:11 +01:00
Andrew
30d7b8997d add addTo function to Handler (#5930) 2017-11-27 19:40:14 +02:00
Guillaume Rischard
b22ca31716 Optimised images. Saved 1.1 MB out of 9.7 MB. 22.3% per file on average (up to 62%) (#5936) 2017-11-22 15:33:24 +01:00
Per Liedman
1da6222cfb Revert "Enable mouse events on multiple canvas renderers (#5752)" (#5924)
This reverts commit d6739c20c1.
2017-11-17 16:15:21 +01:00
Isak Prytz
4c0c3acdd6 added check for noMoveStart option in map.flyTo (#5923)
* added check for noMoveStart option in map.flyTo

* added implicit false parameter to _moveStart when noMoveStart option is not set

* Shorten option check

* Fix typo :(
2017-11-17 16:08:26 +01:00
jaymmartin
d6739c20c1 Enable mouse events on multiple canvas renderers (#5752)
* Enable mouse events on multiple canvas renderers

* Style Fixes

* Define position before using it
2017-11-17 16:06:20 +01:00
Martin Palmér
1d8cc53408 #5921 Remove touch based click tolerance (#5922) 2017-11-17 14:36:23 +01:00
Aaron Planell Lopez
ceb41bca98 Fix function _animateZoom if redirects in the middle of a transition (flyTo). 2017-11-15 09:21:59 +01:00
iH8
abc3bf3027 Set _tilezoom to undefined instead of null (#5888)
* Set _tilezoom to undefined instead of null

Set _tilezoom to undefined instead of null

Fix for #5871 https://github.com/Leaflet/Leaflet/issues/5871

* add test
2017-11-13 14:27:52 +01:00
Louis Pierrestiger
e04bb8bb1d docstrings: renamed Zoom/Pan to zoom/pan (#5905) 2017-11-10 09:13:12 +01:00
Maarten Brouwers
52bd90c27c
add typeof check to checkDeprecatedMixinEvents
!L may result in a undefined error when running tests that also touch including a leaflet plugin.
2017-11-09 10:10:41 +01:00
ghybs
cf518ff1a5 Fix(Map): stopLocate on map.remove (#5893)
so that Geolocation handlers (namely _handleGeolocationResponse and _handleGeolocationError) do not try to access DOM elements which have been cleared by map.remove().
Of course developer should currently call map.stopLocate() manually before map.remove(), but it looks like he/she may forget it.
Check for _locationWatchId is not perfect (watch may have been already stopped), but calling stopLocate again does not harm. It prevents trying to access the Geolocation API if locate had never been called, even though doing so should not harm either.
2017-10-31 17:46:28 +02:00
ghybs
8dbc4fc9d7 Docs(Map): typo on Map Geolocation watch option (#5894) 2017-10-31 17:37:49 +02:00
Per Liedman
0bcccb0190 An event target is considered a marker if it has getLatLng and no or small radius (#5885)
Fixes #5635.
2017-10-30 19:39:33 +02:00
Alexander Musienko
50b77520b3 Stop animation before destroy map (#5876)
* Null ref fix:

TypeError: Cannot read property latLngToLayerPoint of null\n    at NewClass.update (http://my.uboro.eu/js/vendor/leaflet-1.2.0.js?t=1503882088:7295:23)\n    at NewClass.setLatLng (http://my.uboro.eu/js/vendor/leaflet-1.2.0.js?t=1503882088:7256:8)\n

* stop animation before destroy map
2017-10-30 19:38:49 +02:00
iH8
f6e1a9be91 Removed trailing spaces (#5890)
Removed trailing spaces
2017-10-30 16:30:12 +02:00
Per Liedman
c5cbbf8174 Clean up and document event propagation properties (#5880)
* Add sourceTarget and propagatedFrom to events

Also documents events' target, sourceTarget, propagatedFrom
and layer properties.

Fixes #4510.

* Use propagatedFrom, which is equivalent of the original code

* propagetedFrom -> propagatedFrom
2017-10-27 16:18:12 +02:00
scaddenp
118edb9a99 Fix for WMS on Leaflet when using Polar stereographic (#5618)
* Add new method to get NwSe.

Part of fix for https://github.com/Leaflet/Leaflet/issues/5617 for polar WMS systems. Added to bypass using an unsafe bounds object.

* Fix WMS getTileUrl for polar coordinates.

Part of fix for https://github.com/Leaflet/Leaflet/issues/5617 to fetch proper bbox coordinate on polar stereographic projections.

* Update TileLayer.WMS.js

* Update TileLayer.WMS.js

* Update GridLayer.js

* Update GridLayer.js

* Update TileLayer.WMS.js

* Updates to fix syntax/ style issues

Cut/paste error and buch of style stuff.

* Fix style errors

* More style issues

* Yet more style fixes

* More indentation complaints fixed

* Some more code style cleanup

* Even more code style / indentation

* Use bounds
2017-10-27 13:08:35 +02:00
Per Liedman
ca6aff0295 Add notes to classes which don't inherit Class (#5878)
* Add note about LatLng not inheriting Class

Fixes #3301.

* Add note about LatLngBounds, Bounds, Point, CRSs and projections not inheriting Class
2017-10-27 08:27:41 +02:00
Per Liedman
fb613bcaed Clarify that any option keys can be used
Fixes #4001.
2017-10-26 22:32:01 +02:00
Per Liedman
d9846d106b Round pan offset towards zero (#5858)
* Add Point.trunc/_trunc

* Truncate pan offset instead of flooring

Fixes #5821
2017-10-26 15:35:35 +03:00
Andrew
919ead4288 add namespace to svg factory (#5864) 2017-10-23 12:17:19 +02:00
iH8
14fc98cb52 Options for LayerGroup (#5792)
* Options for LayerGroup

Add options parameter to L.Layergroup.initialize and set options.

* Options for LayerGroup factory

Added options parameter to LayerGroup factory method and updated docs
2017-10-23 09:16:24 +02:00
Per Liedman
a9742e0d4b Round circle radius in renderer instead of layer
Makes bounds calculation more precise and zoom level independant.
Fixes #4582.
2017-10-20 14:51:48 +02:00
C Ganesh Sundar
38b3fdec80 Update docs for L.DomEvent.off() (#5855) 2017-10-20 08:29:21 +02:00
ghybs
4782eace28 Docs(MapPanes): add class names links to panes description (#5850)
* Docs(MapPanes): explicitly list layer types in overlayPane

"overlayPane" is the default pane for Layers (https://github.com/Leaflet/Leaflet/blob/v1.2.0/src/layer/Layer.js#L36), but it is overridden for many sub-classes (Marker, DivOverlay, GridLayer).
It would be easier to understand where things go if we explicitly list them in Map Panes section as well. It is almost the case, except for Image Overlay and Video Overlay.

* Docs(MapPanes): convert tooltip class name into code and hyperlink

for consistency with other class names.
2017-10-19 14:23:53 +02:00
Maciej Kus
9084c4a8a3 Docs(imagePath): "absolute path" to "path" (#5835)
This simply removes the word "absolute" from the documentation of Icon.Default.imagePath. This path can be relative or absolute.

e.g. L.Icon.Default.imagePath = 'style/images/'; works just fine for me.
2017-10-11 18:31:45 +03:00
Andrew
bb1d94ac7f add space before className (#5830) 2017-10-10 12:43:34 +02:00