386 Commits

Author SHA1 Message Date
Simon Legner
31586ddf13
Fix pointerover/pointermove/pointerout in debug page (#9811) 2025-08-01 14:02:31 +02:00
Florian Bischof
e9c66955c4
Refactor to PointerEvents (#9620) 2025-05-06 21:11:43 +02:00
Simon Legner
9f80640b8f
Add demo for all GeoJSON types (#9679)
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2025-04-21 21:21:57 +02:00
Simon Legner
90095bc810
VideoOverlay: add controls option (#9666) 2025-04-21 07:57:28 +02:00
Simon Legner
93509f310d
Use for...of (#9653) 2025-04-20 16:40:53 +02:00
Mahendra Pratap Singh
07252ebffb
Rename TouchZoom handler to PinchZoom (keep TouchZoom as alias for backward compatibility) (#9642)
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2025-04-20 13:54:24 +02:00
Jon Koops
7ac98758d4
Drop UMD and make ESM the default entrypoint (#8826)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2025-03-17 15:59:00 +01:00
Iván Sánchez Ortega
45c795a515
Implemented trackResize for L.Popup (#9605)
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2025-03-01 12:55:08 +01:00
alope107
e8b83eedfc
Update docs language for HTML and CSS. (#8934) 2023-04-28 14:34:59 +02:00
Jon Koops
a359cd1576
Use import maps to load Leaflet in the debug directory (#8926) 2023-04-23 16:37:19 +02:00
Jon Koops
f0ca5bc9cf
Convert vector debug pages to ESM (#8924) 2023-04-23 01:20:29 +02:00
Jon Koops
d8028de881
Convert test debug pages to ESM (#8921) 2023-04-21 14:14:43 +02:00
Iván Sánchez Ortega
bedad7e850
Implement BlanketOverlay as Renderer superclass (#8611)
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2023-02-28 20:54:48 +01:00
Jon Koops
d339e899fd
Convert map debug pages to ESM (#8838) 2023-02-13 11:36:48 +01:00
Jon Koops
2acd8c3ece
Convert controls debug page to ESM (#8834) 2023-02-07 22:22:12 +01:00
Jon Koops
7dd8c0030a
Convert geolocation debug page to ESM (#8835) 2023-02-07 22:20:06 +01:00
Jon Koops
9c0a4d97c1
Convert canvas debug page to ESM (#8830) 2023-02-06 20:30:03 +01:00
Jon Koops
673a3b907b
Convert control layers debug page to ESM (#8832) 2023-02-06 20:29:51 +01:00
Jon Koops
2874c49573
Remove jitter debug page (#8829) 2023-02-06 17:27:11 +01:00
Zhongxiang Wang
d1016279f3
fix vector drifts when zoomAnimation is false and zooming via flyTo or pinch (#8794)
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2023-02-02 13:12:08 +02:00
Jon Koops
96a34b5127
Fix implementation for disabling & enabling text selection (#8741) 2022-12-25 14:30:22 +01:00
Jon Koops
2daebbb439
Remove Internet Explorer from browser detection (#8559) 2022-10-13 11:41:13 +02:00
Rob Jackson
4cbd3610cd
Alternate fix for PopUp keepInView recursion and speed up associated test (#8520) 2022-10-08 19:17:40 +02:00
Grant
c2324e52e2
Use preferred tile.openstreetmap.org URL (#8418)
Now that tile.openstreetmap.org supports HTTP/2 + HTTP/3 the old (a|b|c).tile.openstreetmap.org is no longer recommended.

Use tile.openstreetmap.org directly is faster and will likely result in a better cache hit ratio.

Signed-off-by: Grant Slater <git@firefishy.com>

Signed-off-by: Grant Slater <git@firefishy.com>
2022-08-28 11:31:45 +02:00
Jon Koops
519db3d771
Expose ESM entrypoint with Leaflet global (#8329) 2022-07-20 22:18:09 +02:00
Florian Bischof
20654cd159
Replace Mapbox with OpenStreetMap (#7818)
* Replace Mapbox with OpenStreetMap

Replace Mapbox with OpenStreetMap

* Revert Gemfile

* Replace blanks with tabs

* Fix lint

* Replace Mapbox with OSM

* Add OSM Tile Usage Policy link

* typo: productive→production

Co-authored-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
2022-05-27 11:33:15 +03:00
danieldegroot2
ace6be6427
Change OpenStreetMap links to HTTPS (#8009)
* Change OpenStreetMap links to HTTPS

* Change OpenStreetMap links to HTTPS

* Change OpenStreetMap links to HTTPS
2022-02-18 05:42:21 +01:00
Florian Bischof
e4e4d5b7ab
Add playsInline attribute on the video element (#7928) 2022-01-21 13:53:19 +01:00
Falke Design
842dd30cac
Remove leaflet-include.js (#7776)
* Remove not necessary leaflet-include.js

* Remove not necessary leaflet-include.js & line ending
2021-11-25 19:19:15 +02:00
William Entriken
671c7c8bcb
Use "map" as HTML element id everywhere (#7696) 2021-10-29 16:34:17 +03:00
Andreas Hubel
c0bf09ba32
fix outdated osm attribution texts + url (#7345) 2020-12-08 14:17:22 +02:00
Josh Erb
cd12b94a4d
[docs] correct Mapbox examples' tileSize (#6995)
* update debug pages

* correct tileSize & zoomOffset for all Mapbox examples
2020-02-14 01:49:03 +01:00
Josh Erb
4a8e55b0c4 [docs] Update Doc Examples to Use Modern Endpoint (#6905)
* update the first few examples

* Update all legacy Static API urls with modern URLs

* Add missing map??

* oops stray png

* Remove example.html
2019-11-28 08:41:37 +02:00
Andrea Faggin
4ec26a5b69 Added basic SVGOverlay to expose SVG DOM element (#6517)
* Added basic SVG Overlay

* WIP

* Changed parameter name, added comment
2019-04-30 06:37:46 -03:00
ghybs
fe9e0f2333
Fix(Draggable): compensate for container CSS scale (#6055)
* Test(MapDragSpec): add mouse drag with CSS scaled container

This test is failing as of this commit.

* Fix(Draggable): measure drag compensating for CSS scale

so that the computed offset (i.e. user drag length) is divided by the CSS scale applied on the `_element`'s container. Later on when `Draggable` updates the `_element`'s position, the latter is affected by the CSS scale by the browser.
Added a `getSizedParentNode` function in `DomUtil` in order to automatically retrieve the closest parent node in the DOM hierarchy tree that has a non null size (so that we can compute the scale in `DomEvent.getMousePosition`), without having to specify the parent node explicitly (which is ugly).

* Fix(getMousePosition): getBoundingClientRect is in page scale

therefore it must also be divided by the container scale in order to compute the relative position of the event in the scaled container.

* Test(MarkerDragSpec): add drag with CSS scaled container

this should pass automatically at this commit, thanks to the previous modification of Draggable.

* Debug(map-scaled): add draggable marker

as well as another CSS scaled wrapper, plus some border and padding, and debugging console logs, to make sure the computations of `getMousePosition` are correct (correctly removing the border width, and compensating for CSS scale).

* Docs(getMousePosition): explicitly exclude border

* Docs(DomUtil): add return value of getSizedParentNode

was missing in docstring.

* Feat(DomUtil): add getScale function

so that it can be used by DomEvent.getMousePosition and Draggable.

* Refactor(Draggable): cache container scale

to avoid triggering browser reflow continuously during _onMove, but only on drag start (_onDown).
By compensating for the scale within Draggable instead of delegating to DomEvent.getMousePosition, it also becomes possible to check first for the clickTolerance, so that we prevents user's small movement based on screen, irrespective of rendered scale.

* Test(Map+MarkerDrag): remove scale on initial movement

that is intended to overcome Draggable clickTolerance, since now it is based on screen pixels, irrespective of applied CSS scale on the map.
Thanks to the tolerance in the expected final position, this has no effect on the result of the test, even though the overall drag is now slightly shorter.

* Refactor(DomEvent): use DomUtil.getScale in getMousePosition

to factorize scale computation (also used within Draggable).
2018-03-16 19:46:44 +04:00
Roman Zoller
5ffe207921 Use https everywhere for OSM links (#6082)
* Use https everywhere for OSM tile URLs

Use
https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

instead of
http://{s}.tile.osm.org/{z}/{x}/{y}.png
http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

* Use https everywhere for OSM attribution link

Use
https://www.openstreetmap.org/copyright

instead of
http://www.openstreetmap.org/copyright
http://osm.org/copyright
2018-03-12 08:46:20 +01:00
Per Liedman
4bbec02d14 Add license to route
Fixes #2721.
2017-10-26 23:16:20 +02:00
Andrew
78152c9804 Merge pull request #4506 from Leaflet/layer-id-public
Switch to public api for getting the layer id in debug
2017-10-01 19:16:45 +02:00
Andrew
899bdd43de Fix zoom when map container is scaled (#5794)
* fix zoom when container is scaled

* add map-scaled debug page
2017-09-29 17:11:14 +03:00
Alessandro
5228a62a1c feat(Marker.Drag): autoPan implementation (#5651)
* feat(Marker.Drag): autoPan implementation

* Adjust autoPanSpeed to 10

* Add tests for marker drag
2017-08-09 14:18:13 +02:00
Thach Hoang
96fd15450b Remove reference to deps.js in L.VideoOverlay debug example 2017-07-14 21:46:42 -04:00
Guillaume P
ac05f68a39 Canvas: call ctx.setLineDash in _fillStroke (#5454)
* Canvas: call ctx.setLineDash in _fillStroke

This make dashArray working properly for cirles.

fix #5182

* Debug: add dashed circle example

* Debug: add simple example reproducing #5182
2017-04-20 12:41:26 +02:00
Iván Sánchez Ortega
61ff641951 Add new class L.VideoOverlay (#4988)
* Add VideoOverlay class based on ImageOverlay

* Make linter happy

* Move VideoOverlay include to layer/index

* Fix mapbox tokens
2017-04-04 22:45:09 +02:00
Thach Hoang
0d1eae32be Fix debug examples after rollup (#5417)
Fix #5373.

- Remove references to removed file "../../build/deps.js"
- Update leaflet-include.js to point to "../dist/leaflet-src.js"
- Update watch to use the same destination file as rollup (dist/leaflet-src.js)
- Define getRandomLatLng where used
2017-03-28 08:40:48 +02:00
Lyzi Diamond
7391e308cc rotate access tokens (#5338) 2017-02-16 09:44:50 +02:00
Uzerus
cab880d4d8 type attribute not required in HTML5 2017-02-06 20:32:50 +01:00
Vladimir Agafonkin
703ae02aa8 ES6 modules & Rollup (#4989)
* WIP ES6 modules & rollup

* WIP ES6 modules & rollup 2

* WIP ES6 modules & rollup 3

* WIP ES6 modules Browser

* WIP ES6 module fixes

* WIP ES6 modules: simpler browser exports

* WIP ES6: refactor CRS/Projection modules, CRS obj -> CRS.Base

* get rid of unnecessary index.js

* WIP ES6 modules, dom events and stuff

* Make linter happy, rollup to dist/

* revert to CRS namespace/class for now

* WIP rollup: export more stuff

* export controls

* rollup: export Layer

* rollup: export DomEvent

* rollup: export more layer types

* rollup: export Popup/Tooltip

* WIP: ES6-ify marker, icon, domutil, draggable.

* ES6-ify gridlayer, tilelayer.

* ES6-ify: Tweak imports-exports, code is now runnable!!

* ES6-ify: Fix scope in some DomUtils

* ES6-ify: Path, fix Popup

* ES6-ify: Lint & cleanup

* ES6-ify map handlers, more linting

* ES6-ify: Icon.Default namespacing

* ES6-ify: Renderers, CircleMarker

* ES6-ify: Circle, Polyline, LineUtil

* ES6-ify: Polygon, Rectangle, LineUtil, PolyUtil, linting

* ES6-ify: SVG.VML

* ES6-ify: DomEvent.Pointer, DomEvent.DoubleTap

* ES6-ify: Linting, make Karma play nice with Rollup

* ES6-ify: More work on fixing bits breaking some unit tests.

* ES6-ify: rollup the version number, fiddled with build scripts

* ES6-ify: Fiddle with test scripts

* ES6-ify: cleanup (refs to global L, imports from (DOM)Util), prevent cyclic loop on Map imports

* ES6-ify: More cleanup of (DOM)Util/Browser/DomEvent imports

* ES6ify: Use rollup's "legacy" option for ES3 (IE8) builds

* ES6-ify: Clean up build scripts, fix CONTRIBUTING.md instructions

* Typo

* ES6-ify: minor fixes and lefovers after rebasing on top of 1.0.2

* ES6-ify: upgrade to rollup 0.38 for proper IE8 builds, fix L.SVG.VML

* Make linter happy.

* ES6: Fixing typos and sxrew-ups after big rebase

* Fix symlink for debugging scripts

* ES6: Cleanup old build scripts

* ES6-ify: Update build system to include git rev in L.version

* ES6-ify: re-enable unit tests replacing L.Path with L.Polyline

* Export Path

* ES6ify: cleanup old banner file

* ES6-ify: whitespace in var declarations

* ES6-ify: Export toTransformation as L.transformation

* ES6-ify: cleanup L.transform exports

* ES6-ify: "import Util" in Transformation and SVG.VML
2017-01-30 11:35:16 +01:00
Per Liedman
4c484462dc Canvas improvements (#5115)
* WIP refactor canvas clear

* Fix clearing bounds, remov unnecessary code

* Refactor redraw logic

* Remove flicker on update

* Fix code style

* Add support for layer ordering with bringToFront/bringToBack

* Fix redraw when layer moves

* Add example for moving canvas layers

* Fix code style

* Use layer ordering for mouse events

* Fix removing first or last layer
2016-11-18 15:22:35 +01:00
Jon Woyame
d5c499b732 limit css selectors for svg/canvas (#4597) 2016-11-11 10:45:34 +01:00
Per Liedman
d0d699bfa4 Fix missing variable 2016-11-10 11:07:53 +01:00