Socket
Socket
Sign inDemoInstall

leaflet

Package Overview
Dependencies
0
Maintainers
5
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    leaflet

JavaScript library for mobile-friendly interactive maps


Version published
Weekly downloads
1M
increased by1.25%
Maintainers
5
Install size
3.44 MB
Created
Weekly downloads
 

Changelog

Source

1.8.0 (2022-04-18)

⚠️ Breaking Changes

  • Improve reliability of contextmenu event simulation on mobile Safari by introducing a new TapHold handler, replacing legacy Tap (#7026 by @johnd0e)
  • Reorganize DivOverlay/Popup/Tooltip APIs (#7540 by @johnd0e)
  • Improve error / argument handling for event listeners (#7518 by @johnd0e)
  • Improve reliability of touch events simulation on non-touch devices (DomEvent.Pointer) (#7059, #7084, #7415 by @johnd0e)
  • Improve reliability of dblclick event simulation on touch devices (DomEvent.DoubleTap) (#7027 by @johnd0e)
  • Improve reliability of disableClickPropagation (#7439 by @johnd0e)
  • Improve Map hasLayer() and LayerGroup hasLayer() to require a layer as argument (#6999 by @johnd0e)
  • Fix Class.include to not overwrite options (#7756 by @johnd0e)
  • Fix Class.extend to not modify source props object (#6766 by @johnd0e)
  • Improve Browser.touch touch devices detection (#7029 by @johnd0e)
  • Get rid of legacy Android hacks (#7022 by @johnd0e)
  • Allow fonts to respect users' browser settings by making the font-size relative to the map container. (You can change the font size on leaflet-container to adjust it if needed.) (#7800 by @Chandu-4444)

❇️ API changes

✨ Improvements

  • Improve memory footprint by removing will-change CSS property on tile images (#7872 by @janjaap)
  • Improve reliability of icons path detection heuristics (#7092 by @johnd0e)
  • Improve performance of adding tiled sources by avoiding excessive updates in GridLayer.onAdd (#7570 by @johnd0e)
  • Improve handling of edge cases in panInside (#7469 by @daverayment)
  • Minify marker icon SVG (#7600 by @rala72)
  • Allow template keys with spaces in TileLayer URL (#7216 by @lubojr)
  • Improve behavior of Tooltip bound to ImageOverlay (#7306 by @IvanSanchez)
  • Remove the gap between Popup tip and content dialog (#7920 by @Malvoz)
  • Fire mousemove through Canvas to map if it has no layers (#7809 by @johnd0e)
  • Add print styles to prevent printers from removing background-images in controls (#7851 by @Malvoz)
  • Move attribution code from Layer to Control.Attribution (#7764 by @johnd0e)
  • Refactor vmlCreate() so that it does not expose closure to TypeError (#7279 by @darcyparker)
  • Improve reliability of Control.Layers by not relying on Browser android and touch properties (#7057 by @johnd0e)
  • Improve reliability of Tooltip by not relying on Browser touch checks (#7535 by @johnd0e)
  • Make Browser mutable for easier automated testing (#7335 by @bozdoz)
  • Replace div with span in Control.Layers container to fix an HTML validation error (#7914 by @tmiaa)
  • Add a Ukrainian flag to default attribution 🇺🇦 (by @mourner in https://github.com/Leaflet/Leaflet/pull/8109)

🙌 Accessibility

  • Increase default font sizes and decrease attribution transparency for improved legibility (#8057, by @mourner)
  • Improve accessibility of popup close button (#7908, by @Malvoz)
  • Auto pan to markers on focus by default for improved keyboard operability (#8042 by @IvanSanchez)
  • Add accessibility section to plugins guide (#7277 by @Malvoz)
  • Update Marker to default to role="button" & alt="marker" for an improved screen reader experience (#7895 by @tmiaa)
  • Set role="button" for appropriate semantics on the <a> layers control (#7850 by @Malvoz)
  • Generally enable outlines for keyboard users by not stripping outline on focus for keyboard events (#7259 by @jafin)
  • Enable outlines on leaflet-container for keyboard users (#7996 by @Malvoz)
  • Multiple enhancements to popup's close button (#7794 by @Falke-Design)
  • Use relative font-size units for resizable text (#7800 by @Chandu-4444)
  • Apply :hover styles to :focus as well (#7274 by @Malvoz)
  • Hide the decorative attribution separator from screen readers (#7969 by @Malvoz)
  • Make the disabled state of zoom controls available to screen readers (#7280 by @akshataj96)
  • Hide the +/- characters in zoom controls from screen readers to prevent erroneous announcements (#7795 by @Falke-Design)

🐞 Bug fixes

  • Fix vector drift when dragging and immediately zooming (by @manubb @johnd0e @mourner in https://github.com/Leaflet/Leaflet/pull/8103)
  • Reduce the occurrence of glitches on rapid zoom (by @mourner in https://github.com/Leaflet/Leaflet/pull/8102)
  • Fix Marker jumping position while zooming in certain cases (#7967 by @Falke-Design)
  • Fix opening / closing Tooltip while dragging the map (#7862 by @Falke-Design)
  • Break the reference to the options of the Class prototype (#7459 by @Falke-Design)
  • Improve Tooltip options permanent & sticky to work together (#7563 by @Falke-Design)
  • Check if map container is still connected with Leaflet in locate event listener (#7813 by @Falke-Design)
  • Fix Tooltip bindTooltip to unbind existent tooltip (#7633 by @Falke-Design)
  • Correct if condition, to add zoom limits for Layer (#7609 by @vcoppe)
  • GridLayer redraw tiles after changing maxNativeZoom (#6443 by @cherniavskii)
  • Fix Popup keepInView if the map needs to panned over a long distance (#7792 by @Falke-Design)
  • Tolerate wrong event names in add/removePointerListener (#7808 by @johnd0e)
  • Reset width & padding to prevent cascading CSS from breaking tile rendering (#6843 by @Spudley)
  • Fix mousedown event calling after dragging Canvas map (#7781 by @johnd0e)
  • Decrease console.warn pollution (#7748 by @johnd0e)
  • Fix contextmenu event default-preventing when there are >1 target candidates (#7544 by @johnd0e)
  • Prevent click on Popup-tip from firing on map. (#7541 by @johnd0e)
  • Fix error by calling Path.setStyle before adding the layer to the map (#6941 by @NielsHolt)
  • Reset BoxZoom after cancel with ESC (#7597 by @Falke-Design)
  • Fix noConflict (#7855 by @Falke-Design)
  • Fix popup appearance when content is empty (#8136, by @ansh-ag)
  • Fix latLngToCoords and latLngsToCoords not accepting array form of lat/lngs (#7436, by @Relkfaw)

📝 Docs

🔧 Workflow

🧪 Tests

Readme

Source

Leaflet was created 11 years ago by Volodymyr Agafonkin, a Ukrainian citizen living in Kyiv.

Volodymyr is no longer in Kyiv, because Russian bombs are falling over the city. His family, his friends, his neighbours, thousands and thousands of absolutely wonderful people, are either seeking refuge or fighting for their lives.

The Russian soldiers have already killed tens of thousands of civilians, including women and children, and are committing mass war crimes like gang rapes, executions, looting, and targeted bombings of civilian shelters and places of cultural significance. The death toll keeps rising, and Ukraine needs your help.

As Volodymyr expressed a few days ago:

If you want to help, educate yourself and others on the Russian threat, follow reputable journalists, demand severe Russian sanctions and Ukrainian support from your leaders, protest war, reach out to Ukrainian friends, donate to Ukrainian charities. Just don't be silent.

Ukrainians are recommending the Come Back Alive charity. For other options, see SupportUkraineNow.org.

If an appeal to humanity doesn't work for you, I'll appeal to your egoism: the future of Ukrainian citizens is the future of Leaflet.

It is chilling to see Leaflet being used for documenting Russia's war crimes, factual reporting of the war and for coordination of humanitarian efforts in Romania and in Poland. We commend these uses of Leaflet.

If you support the actions of the Russian government (even after reading all this), do everyone else a favour and carry some seeds in your pocket.

Yours truly,
Leaflet maintainers.


Leaflet

Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 39 KB of gzipped JS plus 4 KB of gzipped CSS code, it has all the mapping features most developers ever need.

Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms out of the box, taking advantage of HTML5 and CSS3 on modern browsers while being accessible on older ones too. It can be extended with a huge amount of plugins, has a beautiful, easy to use and well-documented API and a simple, readable source code that is a joy to contribute to.

For more info, docs and tutorials, check out the official website.
For Leaflet downloads (including the built main version), check out the download page.

We're happy to meet new contributors. If you want to get involved with Leaflet development, check out the contribution guide. Let's make the best mapping library that will ever exist, and push the limits of what's possible with online maps!

CI

Keywords

FAQs

Last updated on 18 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc