Skip to content

Instantly share code, notes, and snippets.

@IvanSanchez
Created April 15, 2016 12:42
Show Gist options
  • Save IvanSanchez/55dac3f75ddfc80d21e5655100c1ba65 to your computer and use it in GitHub Desktop.
Save IvanSanchez/55dac3f75ddfc80d21e5655100c1ba65 to your computer and use it in GitHub Desktop.
layout title description author authorsite
post
Announcing Leaflet 1.0-rc1
Leaflet 1.0 Release Candidate 1 ready
Iván Sánchez

The road to Leaflet 1.0 continues - we're proud to get the first release candidate for 1.0 into the wild.

Leaflet 1.0-rc1 closes down on edge cases and API inconsistencies that were present on beta2. The full list of changes in the 1.0.0-rc1 changelog as usual, with about 50 bugfixes and a dozen improvements and minor API changes.

Notable changes

  • Fractional zoom controls: In beta2, developers could set a fractional zoom level only by code, running e.g. map.setZoom(8.5). Now the map has options (zoomSnap and zoomDelta) to let the user navigate through fractional zoom levels.

  • Better handling of vector layers when using the <canvas> renderer, when layers are non-interactive and lines are dashed.

  • The first ever Microsoft Edge hack (handle inconsistent dblclick behaviour on Win10 touchscreens)

  • Unit tests with prosthetic-hand, letting us be sure that touch interactions behave consistently. This has its own blog post.

Changes in the API documentation

The API documentation is now generated from docstrings, thanks to a new tool dubbed 🍂doc (or "leafdoc").

Previously, the API documentation was edited manually. This involved a lot of copy-pasting and, over time, bits of code started to not matching the documentation.

Most complex software projects use some form of docstrings and tools like JavaDoc, NaturalDocs or JSdoc to convert the docstrings into webpages.

But the documentation for Leaflet requires a few special bits - docstrings cover methods and properties, but they do not cover options nor events, and we wanted to maintain the current look and feel of the documentation. 🍂doc was then born to overcome these limitations.

Leaflet uses class inheritance quite extensively, and the old documentation was sometimes not clear about it. Some users struggled to find the available methods for some of the classes, and inherited options were sometimes mentioned, sometimes not. 🍂doc fixes this by including the documentation of all inherited methods/options/events/properties, collapsed by default:

Collapsed inheritances for L.Polygon

The build system now builds a HTML file with the API docs alongside the minified leaflet.js file. Documentation will be updated on every release based on that file, and pull requests to the gh-pages branch to fix the documentation will be automatically rejected.

Get the release candidate

As with previous releases, you can use our CDN:

<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v1.0.0-rc1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet/v1.0.0-rc1/leaflet.js"></script>

The release is also available through NPM (npm install leaflet@rc), and GitHub download.

The future

TODO: Add a photo from the Madrid hack weekend, toasting to the audience

Best, Iván & Vladimir & Yohan & Per & Zsolt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment