Commit Graph

3427 Commits

Author SHA1 Message Date
2daebbb439 Remove Internet Explorer from browser detection (#8559) 2022-10-13 11:41:13 +02:00
2fa27755ee Support sticky map container positioning (#8550) 2022-10-09 20:13:02 +03:00
4cbd3610cd Alternate fix for PopUp keepInView recursion and speed up associated test (#8520) 2022-10-08 19:17:40 +02:00
02f204e782 Fix 2 links without URLs in docs (#8542) 2022-10-08 12:41:20 +03:00
12ea803762 Remove the long-deprecated L.Mixin.Events and _flat (#8537) 2022-10-07 19:26:16 +03:00
2eb6240ae7 Fix intermittent wobble when setMaxBounds(map.getBounds()) (#8534) 2022-10-06 20:01:32 +03:00
8ae526bab8 Remove usage of global L and safeguard against it (#8536) 2022-10-06 19:57:40 +03:00
2a7b51b720 docs: 📝 Adding documentation for the support of lon in the latLng function, resolves 8509 (#8524)
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
2022-10-05 07:34:55 +02:00
d80bab1f39 Change <section> to <fieldset> in the layers control (#7912) 2022-10-04 19:26:38 +02:00
0877196c6a Fix marker popup location (#8523)
Co-authored-by: Jon Koops <jonkoops@gmail.com>
2022-10-04 16:59:52 +03:00
579c90d271 Check if getElement() is undefined before adding focus listener (Canvas) (#8498) 2022-10-03 17:59:58 +03:00
00416a546f Add getWheelPxFactor and fix test changes the option 'wheelPxPerZoomLevel' for mac (#8512)
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
2022-10-03 14:16:07 +03:00
87cbaf8a2d Remove maxMargin from Bounds.equals doc string (#8500) 2022-10-01 15:30:19 +02:00
6f50f5d6f4 fixing typo lon->lng in docs (#8497) 2022-09-30 21:47:36 +02:00
4372a9fcad Replace Util.bind() with Function.bind() (#8484) 2022-09-29 15:45:16 +02:00
508dac4fb3 Fix Events.listens for nested propagations (#8457) 2022-09-22 18:32:19 +02:00
0fa492c239 drop legacy VML code & support for IE7–8 (#8196) 2022-09-22 12:47:54 +03:00
b1197f0623 Update Center calculation to work for very small layers too (#8433) 2022-09-09 18:31:04 +03:00
5e9e3c7490 Fix invalid GeoJSON on unbalanced arrays (#7637)
* Bug Fix for issue 7627

* Add test

Co-authored-by: Florian Bischof <design.falke@gmail.com>
2022-08-28 23:33:22 +03:00
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
f10b44b3af Add content and latlng set able while initializing (#7783) 2022-08-28 12:19:45 +03:00
96977a1935 Fix 2 step mouse wheel scrolling (#8298)
* Fix double scroll

* Update comment

* Change wheelPxFactor for Mac
2022-08-04 11:31:27 +02:00
519db3d771 Expose ESM entrypoint with Leaflet global (#8329) 2022-07-20 22:18:09 +02:00
be4f751b96 Update getCenter() calculation and move it to PolyUtil / LineUtil (#7603) 2022-07-17 22:58:59 +02:00
be871e6f70 Fix wrong assigned parameter while calling map._move over requestAnimFrame (#8328)
Co-authored-by: jiangliuer <jiangliuer@pinduoduo.com>
2022-07-06 13:25:07 +02:00
de660fb35b Extend Bounds to have the same functions as LatLngBounds (#7882)
* Extend Bounds to have the same functions as LatLngBounds

* Fix lint
2022-06-18 15:01:15 +02:00
c50688a25f Fix: _isClickDisabled throws error if parent is removed from DOM (#8288)
* disableClickPropagation: does not break if element is not in the DOM

* Update spec/suites/map/MapSpec.js
2022-06-08 11:37:14 +03:00
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
714b9e23cf Remove border styles in overflowing popups (#8260)
* Remove border styles in overflowing popups

* Document `leaflet-popup-scrolled` CSS selector

* Be explicit about which type of selector
2022-05-24 19:18:24 +03:00
B01
382f2d3d90 Better PosAnimation example (#7386)
* Better example

https://github.com/Leaflet/Leaflet/issues/6175

* Update PosAnimation.js

Small changes

* Fix lint

Co-authored-by: Florian Bischof <design.falke@gmail.com>
2022-05-20 17:16:37 +02:00
671ebdf611 Tooltip accessibility improvements: focus and voice over (#8247)
* Tooltips are read by voice over.

* Remove unneeded changes in separate test

* Remove unnecessary code

* Move out repeated code into separate function

* Consistent naming

* Add test for aria-describedby for a layer group

* Remove arrow functions and other review fixes
2022-05-18 16:57:54 +03:00
e4d5fb4780 DomEvent.DoubleTap ignores clicks on <label>s (#8227)
* DomEvent.DoubleTap ignores clicks on <label>s

Fixes #8225.

When clicking on a <label> linked to an <input> (or vice
versa), browsers trigger an extra click on the related
element. This causes the DoubleTap logic to activate
and fire a ghost dblclick event.

This change makes the DoubleTap logic ignore clicks on
labels or children of labels (but not when there's
an <input> on the propagation path of the event, which
means there's an <input> nested inside a <label>).

* typo: label 'ref'→'for' attribute

* Added DomEvent.getPropagationPath() polyfill

* Add test

Co-authored-by: Florian Bischof <design.falke@gmail.com>
2022-05-11 22:57:07 +02:00
f90f9a4c80 Remove "listener not found" warning (#8234) 2022-05-11 22:08:54 +03:00
214193206c Fix fire same event inside of once() (#8190)
* Fix once called twice

* fix lint

* Update src/core/Events.js

Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
2022-04-27 16:43:42 +03:00
22c151e213 attribution flag now resizes with font-size changes (#8183)
* attributin flag resizes with font-size

* removed + sign

* added back mistakenly removed css properties

* flag now resizing

Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>

* IE 11 visual bug

* fixed typo, attribution flag now resizes

* fixed indentation

Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
2022-04-27 11:20:44 +03:00
0f987feda9 Feature / Fix: Extend Events.listens to search for specific function (#8161)
* Update Events.listens to search for specific function

Check if listener is existing in `_panInsideMaxBounds` before rm listene

revert example

Fix lint

* Refactor _listens

* Add function definition for IE

* Refactor

* Return index and remove indexOf

* _listens return number or false

* Revert to true

Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
2022-04-25 14:03:22 +03:00
990d49773a Bugfix min/maxZoom & detectRetina (#7328)
* adds failing test for loading tiles with identical min/maxZoom and detectRetina

* fixes incorrect min/maxZoom when detectRetina; closes #7326

* revert whitespace change

* makes L.Browser mutable

* removes devicePixelRatio in before.js

* Revert "makes L.Browser mutable"

This reverts commit 3677f23eb3.

* changes TileLayer test to check that correct min/max zooms are set

* try to fix IE10 test

* fix to IE10: use var

* makes sure min and maxzoom are valid in relation to each other

Co-authored-by: bozdoz <howaboutben@gmail.com>
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2022-04-25 12:30:33 +03:00
cd0dcddecc Implemented missing logic for noMoveStart when using panTo function (#6685)
* Implemented missing logic for noMoveStart when using panTo function

* Add test and apply suggestions from johnd0e

Co-authored-by: Tobias Johansson <tobias_johansson@live.se>
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2022-04-22 15:56:02 +03:00
9e97c62a2f Remove role="presentation" from image tiles (#8172) 2022-04-22 02:39:53 +03:00
8a2e9c074b Add FeatureCollection to geometryToLayer (#8163) 2022-04-20 19:12:34 +03:00
118ca44350 Fix "listener not found" warning when setting maxBounds (#8168)
* fix listener not found warning when setting maxBounds

* fix setMaxBounds invalid bounds early return
2022-04-20 14:57:11 +03:00
5f2b480d3e fix map.getCenter() returning a mutable object (#8167) 2022-04-20 12:50:18 +03:00
2da373f2ab Fix regression about popup close button modifying the URL (#8160)
Fixes #8159
2022-04-19 17:03:30 +02:00
0daaa23116 Link to marker accessibility guideline from docs (#8146) 2022-04-16 18:40:12 +02:00
b3e1b241f1 Allow raw latlng array in latLngToCoords/latLngsToCoords (#7436)
* Add Array traitment into latLngToCoords/latLngsToCoords

add array management into function latLngToCoords and coordsToLatLngs

Add array management into GeoJSON.latLngToCoords andGeoJSON.latLngToCoords

* Add tests

* minify code

* remove redundant code

* revert change

Co-authored-by: Dorian Benedetti <dorian.benedetti@etu.u-bordeaux.fr>
Co-authored-by: Florian Bischof <design.falke@gmail.com>
2022-04-15 14:27:51 +02:00
763e841c93 Fix vector drift when dragging and immediately zooming (#8103)
* Fix weird geometry move when zooming during a drag

* Draggable: allow single-touch drag only

Finish drag if more than 1 touch detected to avoid conflict with touchZoom

* make sure inertia doesn't interfere with pinch zoom

* Add tests

Co-authored-by: Manuel Baclet <mbaclet@gmail.com>
Co-authored-by: johndoe <johnd0e@mail.ua>
Co-authored-by: falke-design <design.falke@gmail.com>
2022-04-04 18:28:16 +03:00
483545c72b Add a Ukrainian flag to default attribution 🇺🇦 (#8109)
* add a Ukrainian flag to default attribution

* use SVG for Ukrainian flag rather than emoji

* fix lint

* detect inline SVG for Ukrainian flag

* add aria-hidden to Ukrainian flag

Co-authored-by: Robert Linder <robert.vuj.linder@outlook.com>

Co-authored-by: Robert Linder <robert.vuj.linder@outlook.com>
2022-04-03 15:42:32 +03:00
fad475a871 Small typo in map dragging option description (#8105)
* Small typo in map dragging option description

* Update reference-0.7.7.html

* Edit correct file
2022-04-03 08:13:00 +03:00
be1d9d3518 remove an old iOS hack to fix #8101 (glitchy zoom) (#8102) 2022-04-01 00:54:13 +03:00
09dab3c1cb Fix panFocus on icon with no iconSize (#8091) 2022-03-28 10:58:49 +03:00