-
Notifications
You must be signed in to change notification settings - Fork 799
Esri Leaflet 1.0.0 Announcement
It's what all of you have been waiting for, a stable release of Esri Leaflet! Many, many people I have talked to have loved using Esri Leaflet for building custom apps with ArcGIS Services and for a long time I delayed the release of a full 1.0.0 version until Leaflet's own 1.0 release. But several developers told me this:
I would love to use Esri Leaflet but I can't use any beta software
Because of this, I realized that we shouldn't force everyone to upgrade to Leaflet 1.0 just to get a stable release of Esri Leaflet. This was also spurred on by the upcoming Leaflet 1.0 release and Vladimir (@mourner) proclaiming:
The latest stable version, 0.7.3, is already perfect
He isn't lying, Leaflet 0.7.3 was released over a year ago and has been stable and extremely bug free. It made sense to provide a stable release of Esri Leaflet for use with Leaflet 0.7.3 So the last few days John Gravois (@jgravois) and I have started to wrap up the last sets of changes to release Esri Leaflet 1.0. We will also be releasing 1.0 versions of:
- esri-leaflet
- esri-leaflet-geocoder
- esri-leaflet-heatmap-feature-layer
- esri-leaflet-clustered-feature-layer
- esri-leaflet-gp
The initial release of these plugins will be followed by 1.0.0 releases for other plugins like renderers later.
When Leaflet 1.0 is released we will most likely release either a 2.0 beta 1 or a 2.0.0 release of Esri Leaflet. Future releases of Esri Leaflet will be fully compliant with SemVer:
- 1.0.X - stable and compatible with Leaflet 0.7.3, bug fixes only
- 2.X.X - stable and compatible with Leaflet 1.X.X, new features and bug fixes
This means that you can use a stable release of Esri Leaflet without having to wait for Leaflet 1.0 and all your other plugins to release Leaflet 1.0 compatible versions.
There are breaking changes in Esri Leaflet 1.0 please read the through the changes carefully and make adaptations to your code. In general you will probably need to make changes if you:
- Are using
FeatureLayer
,DynamicMapLayer
, orImageLayer
as we now expect theurl
of the resource you want to load to be provided within an options object.
L.esri.featureLayer({
url: 'http://server/arcgis/rest/services/{servicename}/FeatureServer/0/'
}).addTo(map);
- Are using
thing.query()
,thing.identify()
orthing.find()
or theFind
,Query
orIdentify
tasks. Callbacks now can be run multiple times to allow for handling of authentication errors. Make sure you eitherreturn
after handling errors and/or check for a successful response before proceeding. Never assume a response succeeded. - Are using
L.esri.Services.FeatureLayer
- this has been renamed toL.esri.Services.FeatureLayerService
// assume layer requires a token
layer.query().run(function(error, features){
if(error) {
// handle the error here
return; // return early to stop execution of the callback
}
// do something with features
});
The major change will be relying solely on Leaflet 1.0 which offers quite a few benefits:
- Performance increases to event propagation, lat lng creation, ect...
- Memory usage reductions for popups and other things
- New features like fractional zoom levels and new animation engine
- Better tools for plugin authors like a new
Layer
base class, options merging and event propagation - Removal of hardcoded projections hacks
- A new
map.createPane
system for managing layer ordering - A new
Renderer
interface for handling vector drawing
Overall this means that apps will fun faster, smoother and better while enabling a few excellent new features:
- Vector tiles with fractional zoom levels
- Substantially better support for non-mercator spatial references
- Fine grain control of layer ordering
- Handling of larger numbers of vector shapes
All of these have been features that are of great interest to Esri Leaflet users that are only really possible with Leaflet 1.0, so look for Esri Leaflet to take advantage of them soon!