esri-leaflet
Advanced tools
Changelog
[1.0.2]
Changelog
[1.0.1]
Changelog
[2.0.0-beta.6]
FeatureLayer
from maps (again)Changelog
[2.0.0-beta.5]
console.log
statementsFeatureLayer
from mapsChangelog
[2.0.0-beta.4]
L.esri.Layers
, L.esri.Services
and L.esri.Tasks
have been removed for better compatibility with ES 2015 modules. This means you should now write L.esri.query()
for example as opposed to L.esri.Tasks.query()
.FeatureLayer
import featureLayer from 'esri-leaflet/src/Layers/FeatureLayer';
for more compact builds but be aware of caveatsvar featureLayer = require('esri-leaflet/src/Layers/FeatureLayer');
for more compact builds but be aware of caveatsChangelog
[2.0.0-beta.1]
This release is the first release that supports Leaflet 1.0.0-beta.1.
featureLayer.resetFeatureStyle(id, style)
for reseting the styles on a specific feature to their original style.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 the L.esri.basemapLayer
options.featureLayer.resetStyle
no longer takes and id and will reset the style of all features. Use the new featureLayer.resetFeatureStyle(id, style)
method.L.circleMarker
should now also use the style
option to set the styles of the vector markers as opposed to setting it in the L.circleMarker
options. This enables the setStyle
, resetStyle
, setFeatureStyle
and resetFeatureStyle
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",
},
});
L.esri.Request
has been removed. Please use L.esri.get
, L.esri.get.CORS
, L.esri.get.JSONP
, L.esri.post
or L.esri.request
directly.Changelog
[1.0.0]
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 to L.esri.Services.FeatureLayerService
. It should be initialized with L.esri.Services.featureLayerService(options)
.url
in their options. E.x. L.esri.featureLayer(url)
should now L.esri.featureLayer({url: url}})
. This does not affect L.esri.baseMapLayer
which still accepts the key
as it's first parameter.error.authenticate(newToken)
as opposed to listening to authenticationrequired
event and calling e.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 should return
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);
});
dynamicLayers
option to L.esri.DynamicMapLayer
https://github.com/Esri/esri-leaflet/issues/566bringToBack
and bringToFront
to L.esri.FeatureLayer
https://github.com/Esri/esri-leaflet/issues/479load
event on L.esri.FeatureLayer
now fires at the proper time https://github.com/Esri/esri-leaflet/issues/545L.esri.DynamicMapLayer
and L.esri.ImageMapLayer
will now automatically use POST for large requests. https://github.com/Esri/esri-leaflet/issues/574L.esri.ImageMapLayer
now defaults to requesting json
as opposed to an image to better handle authentication and large requests https://github.com/Esri/esri-leaflet/issues/574. If your Image Service does not support CORS you should set {f:'image'}
in your options.load
event is now fired after all features are created, rather than when they are all received from the server https://github.com/Esri/esri-leaflet/issues/545L.CircleMarker
with L.esri.Layers.FeatureLayer
https://github.com/Esri/esri-leaflet/issues/534redraw
method on L.esri.Layers.FeatureLayer
for programmatically redrawing features with their latest symbology. https://github.com/Esri/esri-leaflet/pull/550json
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 add useCors: false
to your options.FeatureLayer.resetStyle()
behavior. https://github.com/Esri/esri-leaflet/issues/488DynamicMapLayer
image loading logic. https://github.com/Esri/esri-leaflet/issues/498alt
tag to the Esri logo https://github.com/Esri/esri-leaflet/issues/490identifyFeatures.run()
doesn't return any results. https://github.com/Esri/esri-leaflet/issues/512deleteFeatures()
method to both L.esri.Layers.FeatureLayer
and L.esri.Services.FeatureLayer
for dropping records in bulk. https://github.com/Esri/esri-leaflet/pull/510L.esri.FeatureLayer
. https://github.com/Esri/esri-leaflet/issues/320 and https://github.com/Esri/esri-leaflet/pull/518json
by default to better expose authentication helpersNone
f:'json'
will now be used automatically when a proxy is set for L.esri.DynamicMapLayer
. https://github.com/Esri/esri-leaflet/issues/464identify()
and L.esri.Tasks.Identify
. https://github.com/Esri/esri-leaflet/issues/443Task
and Service
constructors now accept url
as a value within options, rather than as a separate parameter. #420url
string to be supplied as the first parameter, but afterwards, the property is now accessible via Layer.options.url instead of Layer.urlminZoom
, maxZoom
, #413 and cacheLayers
were added as new FeatureLayer constructor optionsL.esri.Controls.Logo
#383L.esri.TiledMapLayer
now accepts a token option for secured tiles. #384DynamicMapLayer
still rendering after being removed from the map. #386L.esri.Tasks.Find
#379bower install esri-leaflet
now works properly.contains
, overlaps
and intersects
to L.esri.Tasks.Query
.L.esri.Tasks.Query
can now accept the following Leaflet types, L.Marker
, L.Polygon
, L.Polyline
, L.LatLng
, L.LatLngBounds
and L.GeoJSON
. It can also accept valid GeoJSON Point, Polyline, Polygon and GeoJSON Feature objects containing Point, Polyline, Polygon.L.LatLng
and L.LatLngBounds
now accept the simple [lat,lng] or [[lat,lng], [lat,lng]] forms.L.esri.Task
now accepts proxy
and useCors
like L.esri.Service
. https://github.com/Esri/esri-leaflet/pull/359L.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-layerpopupOptions
are now properly persevered https://github.com/Esri/esri-leaflet/pull/348setStyle
now permanently overrides the style in options.style
. https://github.com/Esri/esri-leaflet/pull/349setWhere
and setTimeRange
now take callbacks. https://github.com/Esri/esri-leaflet/pull/354XMLHttpRequest
. https://github.com/Esri/esri-leaflet/pull/354returnGeometry
can now be set on L.esri.Tasks.Query
. https://github.com/Esri/esri-leaflet/pull/358run
or bounds
) now return an instance of XMLHttpRequest
as opposed to the task or service.bindPopup
on L.esri.DynamicMapLayer
now identifies only visible features by default rather then all features.where
clauses or long lists of IDs) you may need to setup an instance of https://github.com/Esri/resource-proxy and use the proxy
option.L.esri.Tasks.Identify
has been renamed to L.esri.Tasks.IdentifyFeatures
. This is to reduce confusion with L.esri.Tasks.IdentifyImage
and to clearly delineate what these 2 classes do.logoPosition
option on L.esri.BasemapLayer
https://github.com/Esri/esri-leaflet/issues/210L.esri.Controls.Logo
class. If you use Esri map tiles you must display the Esri Logo!addFeature
, removeFeature
, updateFeature
methods will no longer throw errors when callbacks are omitted. https://github.com/Esri/esri-leaflet/issues/285deleteFeature
now properly removes the feature from the map so it will now appear after zooming or panning. https://github.com/Esri/esri-leaflet/issues/284createfeature
, addfeature
and removefeature
events on L.esri.FeatureLayer
. https://github.com/Esri/esri-leaflet/issues/282L.esri.Tasks.Query
now supports Map Services and Image Services with the new query.layer(id)
and query.pixelSize(point)
params respectivelyL.esri.Tasks.Find
task for searching feature text in Map Services https://github.com/Esri/esri-leaflet/pull/287. Thanks @rdjurasaj-usgs!L.esri.Layers.ImageMapLayer
. Thanks @rdjurasaj-usgs and @tomwaysonL.esri.Tasks.IdentifyImage
for identifying images. Thanks @tomwayson./dist
folder. https://github.com/Esri/esri-leaflet/pull/307Oceans
no longer contains map labels, labels have been added as another key OceansLabels
.L.esri.FeatureLayer
no longer inherits from L.GeoJSON
and as a result no longer has getBounds
, bringToBack
or bringToFront
or addData
methods.L.GeoJSON
.L.esri.Util
namespace please check that they exist.metadata
event. They now have a metadata
method that can be used to get layer metadata. If you need to convert extents into L.LatLngBounds you can use L.esri.Util.extentToBounds
.L.esri.DynamicMapLayer
no longer inherits from L.ImageOverlay
as a result the setUrl
method no longer exists.cluster
object to L.esri.ClusteredFeatureLayer
, instead pass any options you want to pass to L.MarkerClusterGroup
directly to L.esri.ClusteredFeatureLayer
.layerDefs
option on L.esri.DynamicMapLayer
. Layer definitions should now be passed as an object like {'0':'STATE_NAME='Kansas' and POP2007>25000'}
layers
option on L.esri.DynamicMapLayer
you can now only pass an array of layer ids that will be shown like [0,1,2]
.createMarker
method on L.esri.ClusteredFeatureLayer
has been renamed to pointToLayer
.OceansLabels
to L.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
and L.esri.FeatureManager
now handle loading and querying features from the service.L.esri.ClusteredFeatureLayer
and L.esri.HeatMapFeatureLayer
now inherit from L.esri.FeatureManager
so they share many new methods and options.L.esri.FeatureLayer
, L.esri.ClusteredFeatureLayer
and L.esri.HeatMapFeatureLayer
now support time enabled service via from
, to
, timeFields
and timeFilterMode
options and setTimeRange(from, to)
and getTimeRange()
methods.L.esri.FeatureLayer
, L.esri.ClusteredFeatureLayer
and L.esri.HeatMapFeatureLayer
now support where
options and have new methods for setWhere()
and getWhere()
to perform filtering.L.esri.FeatureLayer
now supports generalizing polygon and polyline features on the service side for performance using the new simplifyFactor
option.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.L.esri.Util.geojsonBounds
as it was only being used to create bounds and envelopes for rbush.bindPopup
method to L.esri.DynamicMapLayer
.getTimeRange
and setTimeRange
methods L.esri.DynamicMapLayer
.L.esri.Services
namespace to handle generic abstraction of interacting with ArcGIS Online and ArcGIS server services.L.esri.Services.Service
base class that can be used for interacting with any service. All L.esri.Layers
classes now uses L.esri.Services.Service
internally for their API requests. This class also abstracts authentication and proxying.L.esri.Services.FeatureLayer
class for interacting with the Feature Layer API.L.esri.Services.MapService
class for interacting with the Map Server API.L.esri.Tasks
namespace for tasks that map to individual API methods.L.esri.Tasks.Query
class for interacting with the Feature Layer query API.L.esri.Tasks.Identify
class for interacting with Map Servers that support identify.authenticationrequired
event when they encounter a need for a token. Thanks to @aaronpk for the Oauth demos. #139