All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Improved NationalGeographic and Gray attribution #612
- Fixed removing of
FeatureLayer
from maps (again)
- Removed stray
console.log
statements - Added missing files to NPM
- Fixed removing of
FeatureLayer
from maps
- Nested namespaces for
L.esri.Layers
,L.esri.Services
andL.esri.Tasks
, ``have been removed for better compatibility with ES 2015 modules. This means you should now writeL.esri.query()
for example as opposed to `L.esri.Tasks.query()`.
- Tests are now run against the minified production code for more safety.
- Features no longer flicker when zooming in/out on
FeatureLayer
- Various release process optimizations.
- Support for JSPM in package.json. Now you can
import featureLayer from 'esri-leaflet/src/Layers/FeatureLayer';
for more compact builds but be aware of caveats - Support for browserify in the package.json. Now you can
var featureLayer = require('esri-leaflet/src/Layers/FeatureLayer');
for more compact builds but be aware of caveats
- Files not included in git tag.
- Release process bugs.
This release is the first release that supports Leaflet 1.0.0-beta.1.
- New
featureLayer.resetFeatureStyle(id, style)
for reseting the styles on a specific feature to their original style.
- By default basemap layers
GrayLabels
,DarkGrayLabels
,OceansLabels
,ImageryLabels
,ImageryTransportation
,ShadedReliefLabels
,TerrainLabels
will now be rendered on top of polygons and polylines if the browser supports CSS Pointer Events. You can disable this behavior by passing{pane: "tilePane"}
in theL.esri.basemapLayer
options. - Now relies on the Leaflet 1.0.0-beta.1 release
- Rewritten build and test systems to rely on ES 2015 Modules specification
- More build and release automation
featureLayer.resetStyle
no longer takes and id and will reset the style of all features. Use the newfeatureLayer.resetFeatureStyle(id, style)
method.- Styling point feature layers using vector markers like
L.circleMarker
should now also use thestyle
option to set the styles of the vector markers as opposed to setting it in theL.circleMarker
options. This enables thesetStyle
,resetStyle
,setFeatureStyle
andresetFeatureStyle
options to work properly.
L.esri.featureLayer({
url: 'http://...',
// define how to convert your point into a layer
pointToLayer: function(latlng, feature){
return L.circleMarker(latlng);
},
// style that vector layer
style: {
radius: 10,
color: 'red'
}
})
- All alternate/compact builds have been removed. They will be replaced with a new system for generating custom builds soon.
L.esri.Request
has been removed. Please useL.esri.get
,L.esri.get.CORS
,L.esri.get.JSONP
,L.esri.post
orL.esri.request
directly.
This represents the stable release of Esri Leaflet compatible with Leaflet 0.7.3. All future 1.0.X releases will be compatible with Leaflet 0.7.3 and contain only bug fixes. New features will only be added in Esri Leaflet 2.0.0 which will require Leaflet 1.0.0.
As this is a major release there are a number of breaking changes.
Also see the Esri Leaflet 1.0 announcement.
L.esri.Services.FeatureLayer
has been renamed toL.esri.Services.FeatureLayerService
. It should be initialized withL.esri.Services.featureLayerService(options)
.- All layers now match services and tasks and now only accept
url
in their options. E.x.L.esri.featureLayer(url)
should nowL.esri.featureLayer({url: url}})
. This does not affectL.esri.baseMapLayer
which still accepts thekey
as it's first parameter. - Request callbacks across Esri Leaflet now can handle authentication errors by calling
error.authenticate(newToken)
as opposed to listening toauthenticationrequired
event and callinge.target.authenticate(newToken)
. This means that your callbacks may be called multiple times, once with an authentication failure and once with an authentication success. To avoid any side affects of this you shouldreturn
as early as possible after handling errors. It is recommended you adapt techniques from http://blog.timoxley.com/post/47041269194/avoid-else-return-early to handle these cases.
L.esri.Services.service({
url: 'http://logistics.arcgis.com/arcgis/rest/services/World/ServiceAreas/GPServer/GenerateServiceAreas',
token: 'badtoken'
}).metadata(function(error, response){
if(error && error.authenticate) {
// handle an authentication error, returning to stop execution of the rest of the function
error.authenticate('good token');
return;
}
if(error) {
// handle any other errors, returning to stop execution of the rest of the function
return;
}
// if you get here you are successful!
console.log(metadata);
});
- Added support for the
dynamicLayers
option toL.esri.DynamicMapLayer
Esri#566 - Restored
bringToBack
andbringToFront
toL.esri.FeatureLayer
Esri#479 load
event onL.esri.FeatureLayer
now fires at the proper time Esri#545L.esri.DynamicMapLayer
andL.esri.ImageMapLayer
will now automatically use POST for large requests. Esri#574L.esri.ImageMapLayer
now defaults to requestingjson
as opposed to an image to better handle authentication and large requests Esri#574. If your Image Service does not support CORS you should set{f:'image'}
in your options.
- CDN moved to JS Delivr http://www.jsdelivr.com/#!leaflet.esri
- Non standard scale levels from tile services published in web mercator are now remapped to the standard scale levels Esri#548 Esri#530
- Fixed a bug introduced in RC 7 where features would sometimes not draw Esri#546 Esri#536
load
event is now fired after all features are created, rather than when they are all received from the server Esri#545- Properly handle using
L.CircleMarker
withL.esri.Layers.FeatureLayer
Esri#534 - New
redraw
method onL.esri.Layers.FeatureLayer
for programmatically redrawing features with their latest symbology. Esri#550
- DynamicMapLayer will now request
json
by default to better expose the authentication process. If you are using ArcGIS Server 10.0 or have disabled CORS on your server you will need to adduseCors: false
to your options.
- refactor of
FeatureLayer.resetStyle()
behavior. Esri#488 - improvement of
DynamicMapLayer
image loading logic. Esri#498 - Fixed bug in display of dynamic map services at world scale. Esri#450
- Switched to protocol relative urls for google fonts Esri#501 (thanks @whymarrh!)
- Added an
alt
tag to the Esri logo Esri#490 - Improved a few regexes Esri#494 & Esri#487
- Trap error when
identifyFeatures.run()
doesn't return any results. Esri#512 - Dynamically switch to a smaller Esri logo in smaller maps. Esri#505
- Added a
deleteFeatures()
method to bothL.esri.Layers.FeatureLayer
andL.esri.Services.FeatureLayer
for dropping records in bulk. Esri#510 - Improve logic of rendering simplified features with
L.esri.FeatureLayer
. Esri#320 and Esri#518 - Various doc improvements. Esri#511 & Esri#507 & Esri#506 & Esri#495
- DynamicMapLayer will now request
json
by default to better expose authentication helpers - Attribution for basemaps is now always requested with JSONP
None
f:'json'
will now be used automatically when a proxy is set forL.esri.DynamicMapLayer
. Esri#464- Callback functions will now only be run once when there is a CORS error. Esri#465
- Layer ids will now be included with the GeoJSON response from
identify()
andL.esri.Tasks.Identify
. Esri#443 - Bugfix for adding/removing certain basemap layers. Esri#455
- All
Task
andService
constructors now accepturl
as a value within options, rather than as a separate parameter. #420 - 'Layer' objects continue to expect a
url
string to be supplied as the first parameter, but afterwards, the property is now accessible via Layer.options.url instead of Layer.url
- Fixed duplicate Esri logo bug #427
- GeoJSON is now requested directly from ArcGIS Online Hosted Feature Services #418
- other FeatureLayer performance improvements #416
minZoom
,maxZoom
, #413 andcacheLayers
were added as new FeatureLayer constructor options- default fill is now specified for multipolygons #406
- dark gray basemap now utilizes our new production service #399
- Fixed a bug where resetStyle would not work with MultiPolygon and MultiPolyline features #390
- Fixed a display bug when rapidly toggling L.esri.DynamicMapLayer on/off before the image completely loads #386
- Bower installation fixed #378
- Removed hardcoded http call in
L.esri.Controls.Logo
#383 L.esri.TiledMapLayer
now accepts a token option for secured tiles. #384- Fixed a bug with
DynamicMapLayer
still rendering after being removed from the map. #386 - Fixed 404s on example site.
- Fixed setting sr param on
L.esri.Tasks.Find
#379 bower install esri-leaflet
now works properly.
- Fixed IE 8 and 9 support that was broken in RC 1.
- Fixed sourcemaps by embedding source files inside the maps.
- Fix a bug when aborting JSONP requests
- Other small fixes for plugin support
- Added
contains
,overlaps
andintersects
toL.esri.Tasks.Query
. - Spatial methods on
L.esri.Tasks.Query
can now accept the following Leaflet types,L.Marker
,L.Polygon
,L.Polyline
,L.LatLng
,L.LatLngBounds
andL.GeoJSON
. It can also accept valid GeoJSON Point, Polyline, Polygon and GeoJSON Feature objects containing Point, Polyline, Polygon. - Most methods that accept
L.LatLng
andL.LatLngBounds
now accept the simple [lat,lng] or [[lat,lng], [lat,lng]] forms.
L.esri.Task
now acceptsproxy
anduseCors
likeL.esri.Service
. Esri#359- Esri Leaflet can now be used in Common JS (browserify) and AMD (Dojo, RequireJS) module loaders. Examples will be coming soon.
- Source maps are now built and distributed along with the distribution files to aid in debugging. To learn how to use the source maps Treehouse and HTML5Rocks have excellent resources.
L.esri.ClusteredFeatureLayer
has been moved to its own repository. https://github.com/Esri/esri-leaflet-clustered-feature-layerL.esri.HeatmapFeatureLayer
has been moved to its own repository. https://github.com/Esri/esri-leaflet-heatmap-feature-layer- An edge case when converting ArcGIS > GeoJSON has been resolved Esri#340
popupOptions
are now properly persevered Esri#348setStyle
now permanently overrides the style inoptions.style
. Esri#349setWhere
andsetTimeRange
now take callbacks. Esri#354- You can now abort JSONP requests with request.abort() just like with
XMLHttpRequest
. Esri#354 returnGeometry
can now be set onL.esri.Tasks.Query
. Esri#358- a sample.html file was added to help jumpstart debugging local source files. Esri#364
- Task methods that accept callbacks (like
run
orbounds
) now return an instance ofXMLHttpRequest
as opposed to the task or service. bindPopup
onL.esri.DynamicMapLayer
now identifies only visible features by default rather then all features.- All API requests inside of layers, tasks and services will now switch between GET and POST automatically when the request size exceeds 2000 characters. This improves IE compatibility but means that for long requests (like complex
where
clauses or long lists of IDs) you may need to setup an instance of https://github.com/Esri/resource-proxy and use theproxy
option.
L.esri.Tasks.Identify
has been renamed toL.esri.Tasks.IdentifyFeatures
. This is to reduce confusion withL.esri.Tasks.IdentifyImage
and to clearly delineate what these 2 classes do.
- Logo position can now be controlled by using the
logoPosition
option onL.esri.BasemapLayer
Esri#210 - Logo can now be hidden entirely and re-added to the map with the
L.esri.Controls.Logo
class. If you use Esri map tiles you must display the Esri Logo! - Fix a regression from Beta 4 where features could not be loaded from ArcGIS Server if they were in non-mercator references. Esri#283 Esri#322
- The
addFeature
,removeFeature
,updateFeature
methods will no longer throw errors when callbacks are omitted. Esri#285 deleteFeature
now properly removes the feature from the map so it will now appear after zooming or panning. Esri#284- New
createfeature
,addfeature
andremovefeature
events onL.esri.FeatureLayer
. Esri#282 L.esri.Tasks.Query
now supports Map Services and Image Services with the newquery.layer(id)
andquery.pixelSize(point)
params respectively- New
L.esri.Tasks.Find
task for searching feature text in Map Services Esri#287. Thanks @rdjurasaj-usgs! - Support for image services via
L.esri.Layers.ImageMapLayer
. Thanks @rdjurasaj-usgs and @tomwayson L.esri.Tasks.IdentifyImage
for identifying images. Thanks @tomwayson.
- New example for parsing Feature Collections from ArcGIS Online.
- New example for labeling points with Leaflet.label.
- Travis CI is now running tests Esri#271
- Build are no longer saved in the
/dist
folder. Esri#307 - Development Roadmap has been updated.
Oceans
no longer contains map labels, labels have been added as another keyOceansLabels
.L.esri.FeatureLayer
no longer inherits fromL.GeoJSON
and as a result no longer hasgetBounds
,bringToBack
orbringToFront
oraddData
methods.- L.esri.Util.geojsonBounds has been removed. If you need to get the bounding box of a GeoJSON object please use Terraformer or
L.GeoJSON
. - Many other utility methods have been removed. If you were using methods in the
L.esri.Util
namespace please check that they exist. - Layers no longer fire a
metadata
event. They now have ametadata
method that can be used to get layer metadata. If you need to convert extents into L.LatLngBounds you can useL.esri.Util.extentToBounds
. L.esri.DynamicMapLayer
no longer inherits fromL.ImageOverlay
as a result thesetUrl
method no longer exists.- You can no longer pass a
cluster
object toL.esri.ClusteredFeatureLayer
, instead pass any options you want to pass toL.MarkerClusterGroup
directly toL.esri.ClusteredFeatureLayer
. - You can no long pass a string for the
layerDefs
option onL.esri.DynamicMapLayer
. Layer definitions should now be passed as an object like{'0':'STATE_NAME='Kansas' and POP2007>25000'}
- You can no longer pass a string for the
layers
option onL.esri.DynamicMapLayer
you can now only pass an array of layer ids that will be shown like[0,1,2]
. - The
createMarker
method onL.esri.ClusteredFeatureLayer
has been renamed topointToLayer
.
- Added
OceansLabels
toL.esri.BasemapLayer
. Oceans
has switched to the new Ocean basemap with out labels.L.esri.FeatureLayer
has been refactored into several classes.L.esri.FeatureGrid
andL.esri.FeatureManager
now handle loading and querying features from the service.L.esri.ClusteredFeatureLayer
andL.esri.HeatMapFeatureLayer
now inherit fromL.esri.FeatureManager
so they share many new methods and options.L.esri.FeatureLayer
,L.esri.ClusteredFeatureLayer
andL.esri.HeatMapFeatureLayer
now support time enabled service viafrom
,to
,timeFields
andtimeFilterMode
options andsetTimeRange(from, to)
andgetTimeRange()
methods.L.esri.FeatureLayer
,L.esri.ClusteredFeatureLayer
andL.esri.HeatMapFeatureLayer
now supportwhere
options and have new methods forsetWhere()
andgetWhere()
to perform filtering.L.esri.FeatureLayer
now supports generalizing polygon and polyline features on the service side for performance using the newsimplifyFactor
option.- Don't throw errors when
L.esri.BasemapLayer
is added to maps without an attribution control. If you do not add attribution you must handle adding attribution your self to the map. - Remove rbush. Switch to tracking feature ids with the cell key system.
- Remove
L.esri.Util.geojsonBounds
as it was only being used to create bounds and envelopes for rbush. - add
bindPopup
method toL.esri.DynamicMapLayer
. - add
getTimeRange
andsetTimeRange
methodsL.esri.DynamicMapLayer
. - New
L.esri.Services
namespace to handle generic abstraction of interacting with ArcGIS Online and ArcGIS server services. - new
L.esri.Services.Service
base class that can be used for interacting with any service. AllL.esri.Layers
classes now usesL.esri.Services.Service
internally for their API requests. This class also abstracts authentication and proxying. - new
L.esri.Services.FeatureLayer
class for interacting with the Feature Layer API. - new
L.esri.Services.MapService
class for interacting with the Map Server API. - new
L.esri.Tasks
namespace for tasks that map to individual API methods. - new
L.esri.Tasks.Query
class for interacting with the Feature Layer query API. - new
L.esri.Tasks.Identify
class for interacting with Map Servers that support identify.
- Patches a bug with identifying features on DynamicMapLayer
- Various updates and fixes to examples
- Heat map layer - http://esri.github.io/esri-leaflet/heatmaplayer.html
- Geocoder - http://esri.github.io/esri-leaflet/findplaces.html
- Authentication for ClusteredFeatureLayer https://github.com/Esri/esri-leaflet/commit/d23ddd99ee86bb7255e4d89b6cf3f339a441c88b
- Removed Terraformer as a dependency to cut down on build size and complexity. The neccessary Terraformer methods have been ported into L.esri.Util. This cuts a whomping 15kb from the build!
- Fix for DynamicMapLayer that is outside of min/max zoom levels https://github.com/Esri/esri-leaflet/commit/0d2c2c36ed6ccbad96e0ab24c24cc48f43079ade
- Fix for layerDefs in DynamicMapLayer https://github.com/Esri/esri-leaflet/commit/1375bbf2768ba0fb6806f51c09a3d6fa192521d9
- Add HeatmapFeatureLayer based on Leaflet.heat
- Add where and fields options to FeatureLayer and ClusteredFeatureLayer, and HeatmapFeatureLayer
- Add bounds property to the metadata event when possible #216
- Improve DynamicMapLayer panning and zooming performance. #137
- FeatureLayer and ClusteredFeatureLayer can now load features from map services. Thanks to @odoe and @jgravois.
- FeatureLayer, DynamicMapLayer and ClusteredFeatureLayer all accept a token option for accessing services that require authentication and fire a
authenticationrequired
event when they encounter a need for a token. Thanks to @aaronpk for the Oauth demos. #139 - Add DarkGray and DarkGrayLabels to BasemapLayer. #190
- An attributionControl on maps is now required when using BasemapLayer. #159