React-leaflet: Support for new Leaflet Version 1?

Created on 6 Sep 2015  路  14Comments  路  Source: PaulLeCam/react-leaflet

Hello Paul,

Is react-leaflet 100% compatible with the enhanced new version of leaflet (1.0)? I know it is on beta status, but as it is now the preferred development branch (on 'master') with many new features I cannot resist not to use it:

https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md

P.S. It would be great if there was a branch for extending react-leaflet with the new features of leaflet.

Thanks!

required feature

Most helpful comment

First beta released, you can install it from npm using npm install react-leaflet@next.

All 14 comments

Hello,

No it's not at all made compatible with Leaflet 1.0 beta, and it will probably not be until Leaflet 1.0 is released as stable.
Being in beta means the API can still change and I don't have time to track all the changes upstream to update this lib, I'll probably adapt it once Leaflet 1.0 hits a RC but not before.

Good idea for the new branch, here it is in case you or anybody else has the chance to start adapting it: https://github.com/PaulLeCam/react-leaflet/tree/leaflet-1.0

I'm currently using react-leaflet with the Leaflet beta and haven't seen any issues yet. The only broken things have been due to changed z-indexes in Leaflet's CSS, which doesn't have anything to do with the actual components.

I am also trying react-leaflet 0.7.0 with Leafet 1.0.0-beta.1. In the project here there are not much plugins and it seems to work straight out of box.

For anyone interested in testing it out, you may want to point your local package.json to my testing branch at "react-leaflet": "netsgnut/react-leaflet#v0.7.0-with-leaflet-1.0b1". I have just only changed package.json there; everything else is identical with v0.7.0 release.

I just submitted a PR for Leaflet 1.0, based on some small changes to make Popups work.

React-leaflet seems to just work with Leaflet 1.0, but I haven't exhaustively tried all its features.

Leaflet 1.0.0-rc.1 has been released so its new API should be stable now :+1:

Being in beta means the API can still change

That's not what beta means. A new major version number would indicate an incompatible API change. beta just means there will be more bugs than usual.

+1 Leaflet RC1 :)

+1 for Leaflet 1.0 support

+1

"+1" noise is completely useless, but pull requests are welcome!

Its working reasonably well with 1.0 for the things we've been using it with. One error I did have was with the zoom control but fixed it by doing this if anyone was interested.

import { ZoomControl } from 'react-leaflet';

export default class FixedZoomControl extends ZoomControl {
  componentWillUnmount() {
    this.leafletElement.remove();
  }
}

First beta released, you can install it from npm using npm install react-leaflet@next.

What is the approximate timeline for the first stable release of this library to support leaflet version 1.x?

No timeline for a stable release, please use the RCs in the meantime if you need Leaflet v1 support.

Now released

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josdejong picture josdejong  路  4Comments

lambdakris picture lambdakris  路  3Comments

Shadowman4205 picture Shadowman4205  路  4Comments

aemdeei picture aemdeei  路  3Comments

gane5h picture gane5h  路  3Comments