diff --git a/dist/esri-leaflet-debug.js b/dist/esri-leaflet-debug.js
new file mode 100644
index 000000000..86c33b78d
--- /dev/null
+++ b/dist/esri-leaflet-debug.js
@@ -0,0 +1,3808 @@
+/* esri-leaflet - v2.0.0-beta.8 - Mon Feb 29 2016 13:00:36 GMT-0800 (PST)
+ * Copyright (c) 2016 Environmental Systems Research Institute, Inc.
+ * Apache-2.0 */
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('leaflet')) :
+ typeof define === 'function' && define.amd ? define(['exports', 'leaflet'], factory) :
+ (factory((global.L = global.L || {}, global.L.esri = global.L.esri || {}),global.L));
+}(this, function (exports,L) { 'use strict';
+
+ L = 'default' in L ? L['default'] : L;
+
+ var version = "2.0.0-beta.8";
+
+ var cors = ((window.XMLHttpRequest && 'withCredentials' in new window.XMLHttpRequest()));
+ var pointerEvents = document.documentElement.style.pointerEvents === '';
+
+ var Support = {
+ cors: cors,
+ pointerEvents: pointerEvents
+ };
+
+ /*
+ * Copyright 2015 Esri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the Liscense.
+ */
+
+ // checks if 2 x,y points are equal
+ function pointsEqual (a, b) {
+ for (var i = 0; i < a.length; i++) {
+ if (a[i] !== b[i]) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ // checks if the first and last points of a ring are equal and closes the ring
+ function closeRing (coordinates) {
+ if (!pointsEqual(coordinates[0], coordinates[coordinates.length - 1])) {
+ coordinates.push(coordinates[0]);
+ }
+ return coordinates;
+ }
+
+ // determine if polygon ring coordinates are clockwise. clockwise signifies outer ring, counter-clockwise an inner ring
+ // or hole. this logic was found at http://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-
+ // points-are-in-clockwise-order
+ function ringIsClockwise (ringToTest) {
+ var total = 0;
+ var i = 0;
+ var rLength = ringToTest.length;
+ var pt1 = ringToTest[i];
+ var pt2;
+ for (i; i < rLength - 1; i++) {
+ pt2 = ringToTest[i + 1];
+ total += (pt2[0] - pt1[0]) * (pt2[1] + pt1[1]);
+ pt1 = pt2;
+ }
+ return (total >= 0);
+ }
+
+ // ported from terraformer.js https://github.com/Esri/Terraformer/blob/master/terraformer.js#L504-L519
+ function vertexIntersectsVertex (a1, a2, b1, b2) {
+ var uaT = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]);
+ var ubT = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]);
+ var uB = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]);
+
+ if (uB !== 0) {
+ var ua = uaT / uB;
+ var ub = ubT / uB;
+
+ if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ // ported from terraformer.js https://github.com/Esri/Terraformer/blob/master/terraformer.js#L521-L531
+ function arrayIntersectsArray (a, b) {
+ for (var i = 0; i < a.length - 1; i++) {
+ for (var j = 0; j < b.length - 1; j++) {
+ if (vertexIntersectsVertex(a[i], a[i + 1], b[j], b[j + 1])) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ // ported from terraformer.js https://github.com/Esri/Terraformer/blob/master/terraformer.js#L470-L480
+ function coordinatesContainPoint (coordinates, point) {
+ var contains = false;
+ for (var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) {
+ if (((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1]) ||
+ (coordinates[j][1] <= point[1] && point[1] < coordinates[i][1])) &&
+ (point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0])) {
+ contains = !contains;
+ }
+ }
+ return contains;
+ }
+
+ // ported from terraformer-arcgis-parser.js https://github.com/Esri/terraformer-arcgis-parser/blob/master/terraformer-arcgis-parser.js#L106-L113
+ function coordinatesContainCoordinates (outer, inner) {
+ var intersects = arrayIntersectsArray(outer, inner);
+ var contains = coordinatesContainPoint(outer, inner[0]);
+ if (!intersects && contains) {
+ return true;
+ }
+ return false;
+ }
+
+ // do any polygons in this array contain any other polygons in this array?
+ // used for checking for holes in arcgis rings
+ // ported from terraformer-arcgis-parser.js https://github.com/Esri/terraformer-arcgis-parser/blob/master/terraformer-arcgis-parser.js#L117-L172
+ function convertRingsToGeoJSON (rings) {
+ var outerRings = [];
+ var holes = [];
+ var x; // iterator
+ var outerRing; // current outer ring being evaluated
+ var hole; // current hole being evaluated
+
+ // for each ring
+ for (var r = 0; r < rings.length; r++) {
+ var ring = closeRing(rings[r].slice(0));
+ if (ring.length < 4) {
+ continue;
+ }
+ // is this ring an outer ring? is it clockwise?
+ if (ringIsClockwise(ring)) {
+ var polygon = [ ring ];
+ outerRings.push(polygon); // push to outer rings
+ } else {
+ holes.push(ring); // counterclockwise push to holes
+ }
+ }
+
+ var uncontainedHoles = [];
+
+ // while there are holes left...
+ while (holes.length) {
+ // pop a hole off out stack
+ hole = holes.pop();
+
+ // loop over all outer rings and see if they contain our hole.
+ var contained = false;
+ for (x = outerRings.length - 1; x >= 0; x--) {
+ outerRing = outerRings[x][0];
+ if (coordinatesContainCoordinates(outerRing, hole)) {
+ // the hole is contained push it into our polygon
+ outerRings[x].push(hole);
+ contained = true;
+ break;
+ }
+ }
+
+ // ring is not contained in any outer ring
+ // sometimes this happens https://github.com/Esri/esri-leaflet/issues/320
+ if (!contained) {
+ uncontainedHoles.push(hole);
+ }
+ }
+
+ // if we couldn't match any holes using contains we can try intersects...
+ while (uncontainedHoles.length) {
+ // pop a hole off out stack
+ hole = uncontainedHoles.pop();
+
+ // loop over all outer rings and see if any intersect our hole.
+ var intersects = false;
+
+ for (x = outerRings.length - 1; x >= 0; x--) {
+ outerRing = outerRings[x][0];
+ if (arrayIntersectsArray(outerRing, hole)) {
+ // the hole is contained push it into our polygon
+ outerRings[x].push(hole);
+ intersects = true;
+ break;
+ }
+ }
+
+ if (!intersects) {
+ outerRings.push([hole.reverse()]);
+ }
+ }
+
+ if (outerRings.length === 1) {
+ return {
+ type: 'Polygon',
+ coordinates: outerRings[0]
+ };
+ } else {
+ return {
+ type: 'MultiPolygon',
+ coordinates: outerRings
+ };
+ }
+ }
+
+ // This function ensures that rings are oriented in the right directions
+ // outer rings are clockwise, holes are counterclockwise
+ // used for converting GeoJSON Polygons to ArcGIS Polygons
+ function orientRings (poly) {
+ var output = [];
+ var polygon = poly.slice(0);
+ var outerRing = closeRing(polygon.shift().slice(0));
+ if (outerRing.length >= 4) {
+ if (!ringIsClockwise(outerRing)) {
+ outerRing.reverse();
+ }
+
+ output.push(outerRing);
+
+ for (var i = 0; i < polygon.length; i++) {
+ var hole = closeRing(polygon[i].slice(0));
+ if (hole.length >= 4) {
+ if (ringIsClockwise(hole)) {
+ hole.reverse();
+ }
+ output.push(hole);
+ }
+ }
+ }
+
+ return output;
+ }
+
+ // This function flattens holes in multipolygons to one array of polygons
+ // used for converting GeoJSON Polygons to ArcGIS Polygons
+ function flattenMultiPolygonRings (rings) {
+ var output = [];
+ for (var i = 0; i < rings.length; i++) {
+ var polygon = orientRings(rings[i]);
+ for (var x = polygon.length - 1; x >= 0; x--) {
+ var ring = polygon[x].slice(0);
+ output.push(ring);
+ }
+ }
+ return output;
+ }
+
+ // shallow object clone for feature properties and attributes
+ // from http://jsperf.com/cloning-an-object/2
+ function shallowClone$1 (obj) {
+ var target = {};
+ for (var i in obj) {
+ if (obj.hasOwnProperty(i)) {
+ target[i] = obj[i];
+ }
+ }
+ return target;
+ }
+
+ function arcgisToGeoJSON$1 (arcgis, idAttribute) {
+ var geojson = {};
+
+ if (typeof arcgis.x === 'number' && typeof arcgis.y === 'number') {
+ geojson.type = 'Point';
+ geojson.coordinates = [arcgis.x, arcgis.y];
+ }
+
+ if (arcgis.points) {
+ geojson.type = 'MultiPoint';
+ geojson.coordinates = arcgis.points.slice(0);
+ }
+
+ if (arcgis.paths) {
+ if (arcgis.paths.length === 1) {
+ geojson.type = 'LineString';
+ geojson.coordinates = arcgis.paths[0].slice(0);
+ } else {
+ geojson.type = 'MultiLineString';
+ geojson.coordinates = arcgis.paths.slice(0);
+ }
+ }
+
+ if (arcgis.rings) {
+ geojson = convertRingsToGeoJSON(arcgis.rings.slice(0));
+ }
+
+ if (arcgis.geometry || arcgis.attributes) {
+ geojson.type = 'Feature';
+ geojson.geometry = (arcgis.geometry) ? arcgisToGeoJSON$1(arcgis.geometry) : null;
+ geojson.properties = (arcgis.attributes) ? shallowClone$1(arcgis.attributes) : null;
+ if (arcgis.attributes) {
+ geojson.id = arcgis.attributes[idAttribute] || arcgis.attributes.OBJECTID || arcgis.attributes.FID;
+ }
+ }
+
+ return geojson;
+ }
+
+ function geojsonToArcGIS$1 (geojson, idAttribute) {
+ idAttribute = idAttribute || 'OBJECTID';
+ var spatialReference = { wkid: 4326 };
+ var result = {};
+ var i;
+
+ switch (geojson.type) {
+ case 'Point':
+ result.x = geojson.coordinates[0];
+ result.y = geojson.coordinates[1];
+ result.spatialReference = spatialReference;
+ break;
+ case 'MultiPoint':
+ result.points = geojson.coordinates.slice(0);
+ result.spatialReference = spatialReference;
+ break;
+ case 'LineString':
+ result.paths = [geojson.coordinates.slice(0)];
+ result.spatialReference = spatialReference;
+ break;
+ case 'MultiLineString':
+ result.paths = geojson.coordinates.slice(0);
+ result.spatialReference = spatialReference;
+ break;
+ case 'Polygon':
+ result.rings = orientRings(geojson.coordinates.slice(0));
+ result.spatialReference = spatialReference;
+ break;
+ case 'MultiPolygon':
+ result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0));
+ result.spatialReference = spatialReference;
+ break;
+ case 'Feature':
+ if (geojson.geometry) {
+ result.geometry = geojsonToArcGIS$1(geojson.geometry, idAttribute);
+ }
+ result.attributes = (geojson.properties) ? shallowClone$1(geojson.properties) : {};
+ if (geojson.id) {
+ result.attributes[idAttribute] = geojson.id;
+ }
+ break;
+ case 'FeatureCollection':
+ result = [];
+ for (i = 0; i < geojson.features.length; i++) {
+ result.push(geojsonToArcGIS$1(geojson.features[i], idAttribute));
+ }
+ break;
+ case 'GeometryCollection':
+ result = [];
+ for (i = 0; i < geojson.geometries.length; i++) {
+ result.push(geojsonToArcGIS$1(geojson.geometries[i], idAttribute));
+ }
+ break;
+ }
+
+ return result;
+ }
+
+ function geojsonToArcGIS (geojson, idAttr) {
+ return geojsonToArcGIS$1(geojson, idAttr);
+ }
+
+ function arcgisToGeoJSON (arcgis, idAttr) {
+ return arcgisToGeoJSON$1(arcgis, idAttr);
+ }
+
+ // shallow object clone for feature properties and attributes
+ // from http://jsperf.com/cloning-an-object/2
+ function shallowClone (obj) {
+ var target = {};
+ for (var i in obj) {
+ if (obj.hasOwnProperty(i)) {
+ target[i] = obj[i];
+ }
+ }
+ return target;
+ }
+
+ // convert an extent (ArcGIS) to LatLngBounds (Leaflet)
+ function extentToBounds (extent) {
+ var sw = L.latLng(extent.ymin, extent.xmin);
+ var ne = L.latLng(extent.ymax, extent.xmax);
+ return L.latLngBounds(sw, ne);
+ }
+
+ // convert an LatLngBounds (Leaflet) to extent (ArcGIS)
+ function boundsToExtent (bounds) {
+ bounds = L.latLngBounds(bounds);
+ return {
+ 'xmin': bounds.getSouthWest().lng,
+ 'ymin': bounds.getSouthWest().lat,
+ 'xmax': bounds.getNorthEast().lng,
+ 'ymax': bounds.getNorthEast().lat,
+ 'spatialReference': {
+ 'wkid': 4326
+ }
+ };
+ }
+
+ function responseToFeatureCollection (response, idAttribute) {
+ var objectIdField;
+
+ if (idAttribute) {
+ objectIdField = idAttribute;
+ } else if (response.objectIdFieldName) {
+ objectIdField = response.objectIdFieldName;
+ } else if (response.fields) {
+ for (var j = 0; j <= response.fields.length - 1; j++) {
+ if (response.fields[j].type === 'esriFieldTypeOID') {
+ objectIdField = response.fields[j].name;
+ break;
+ }
+ }
+ } else {
+ objectIdField = 'OBJECTID';
+ }
+
+ var featureCollection = {
+ type: 'FeatureCollection',
+ features: []
+ };
+ var features = response.features || response.results;
+ if (features.length) {
+ for (var i = features.length - 1; i >= 0; i--) {
+ var feature = arcgisToGeoJSON(features[i], objectIdField);
+ featureCollection.features.push(feature);
+ }
+ }
+
+ return featureCollection;
+ }
+
+ // trim url whitespace and add a trailing slash if needed
+ function cleanUrl (url) {
+ // trim leading and trailing spaces, but not spaces inside the url
+ url = L.Util.trim(url);
+
+ // add a trailing slash to the url if the user omitted it
+ if (url[url.length - 1] !== '/') {
+ url += '/';
+ }
+
+ return url;
+ }
+
+ function isArcgisOnline (url) {
+ /* hosted feature services can emit geojson natively.
+ our check for 'geojson' support will need to be revisted
+ once the functionality makes its way to ArcGIS Server*/
+ return (/\.arcgis\.com.*?FeatureServer/g).test(url);
+ }
+
+ function geojsonTypeToArcGIS (geoJsonType) {
+ var arcgisGeometryType;
+ switch (geoJsonType) {
+ case 'Point':
+ arcgisGeometryType = 'esriGeometryPoint';
+ break;
+ case 'MultiPoint':
+ arcgisGeometryType = 'esriGeometryMultipoint';
+ break;
+ case 'LineString':
+ arcgisGeometryType = 'esriGeometryPolyline';
+ break;
+ case 'MultiLineString':
+ arcgisGeometryType = 'esriGeometryPolyline';
+ break;
+ case 'Polygon':
+ arcgisGeometryType = 'esriGeometryPolygon';
+ break;
+ case 'MultiPolygon':
+ arcgisGeometryType = 'esriGeometryPolygon';
+ break;
+ }
+
+ return arcgisGeometryType;
+ }
+
+ function warn () {
+ if (console && console.warn) {
+ console.warn.apply(console, arguments);
+ }
+ }
+
+ var Util = {
+ shallowClone: shallowClone,
+ warn: warn,
+ cleanUrl: cleanUrl,
+ isArcgisOnline: isArcgisOnline,
+ geojsonTypeToArcGIS: geojsonTypeToArcGIS,
+ responseToFeatureCollection: responseToFeatureCollection,
+ geojsonToArcGIS: geojsonToArcGIS,
+ arcgisToGeoJSON: arcgisToGeoJSON,
+ boundsToExtent: boundsToExtent,
+ extentToBounds: extentToBounds
+ };
+
+ var callbacks = 0;
+
+ function serialize (params) {
+ var data = '';
+
+ params.f = params.f || 'json';
+
+ for (var key in params) {
+ if (params.hasOwnProperty(key)) {
+ var param = params[key];
+ var type = Object.prototype.toString.call(param);
+ var value;
+
+ if (data.length) {
+ data += '&';
+ }
+
+ if (type === '[object Array]') {
+ value = (Object.prototype.toString.call(param[0]) === '[object Object]') ? JSON.stringify(param) : param.join(',');
+ } else if (type === '[object Object]') {
+ value = JSON.stringify(param);
+ } else if (type === '[object Date]') {
+ value = param.valueOf();
+ } else {
+ value = param;
+ }
+
+ data += encodeURIComponent(key) + '=' + encodeURIComponent(value);
+ }
+ }
+
+ return data;
+ }
+
+ function createRequest (callback, context) {
+ var httpRequest = new window.XMLHttpRequest();
+
+ httpRequest.onerror = function (e) {
+ httpRequest.onreadystatechange = L.Util.falseFn;
+
+ callback.call(context, {
+ error: {
+ code: 500,
+ message: 'XMLHttpRequest error'
+ }
+ }, null);
+ };
+
+ httpRequest.onreadystatechange = function () {
+ var response;
+ var error;
+
+ if (httpRequest.readyState === 4) {
+ try {
+ response = JSON.parse(httpRequest.responseText);
+ } catch (e) {
+ response = null;
+ error = {
+ code: 500,
+ message: 'Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error.'
+ };
+ }
+
+ if (!error && response.error) {
+ error = response.error;
+ response = null;
+ }
+
+ httpRequest.onerror = L.Util.falseFn;
+
+ callback.call(context, error, response);
+ }
+ };
+
+ httpRequest.ontimeout = function () {
+ this.onerror();
+ };
+
+ return httpRequest;
+ }
+
+ function xmlHttpPost (url, params, callback, context) {
+ var httpRequest = createRequest(callback, context);
+
+ if (typeof context !== 'undefined' && context !== null) {
+ if (typeof context.options !== 'undefined') {
+ httpRequest.timeout = context.options.timeout;
+ }
+ }
+
+ httpRequest.open('POST', url);
+ httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ httpRequest.send(serialize(params));
+
+ return httpRequest;
+ }
+
+ function xmlHttpGet (url, params, callback, context) {
+ var httpRequest = createRequest(callback, context);
+
+ if (typeof context !== 'undefined' && context !== null) {
+ if (typeof context.options !== 'undefined') {
+ httpRequest.timeout = context.options.timeout;
+ }
+ }
+
+ httpRequest.open('GET', url + '?' + serialize(params), true);
+ httpRequest.send(null);
+
+ return httpRequest;
+ }
+
+ // AJAX handlers for CORS (modern browsers) or JSONP (older browsers)
+ function request (url, params, callback, context) {
+ var paramString = serialize(params);
+ var httpRequest = createRequest(callback, context);
+
+ if (typeof context !== 'undefined' && context !== null) {
+ if (typeof context.options !== 'undefined') {
+ httpRequest.timeout = context.options.timeout;
+ }
+ }
+
+ var requestLength = (url + '?' + paramString).length;
+
+ // request is less then 2000 characters and the browser supports CORS, make GET request with XMLHttpRequest
+ if (requestLength <= 2000 && Support.cors) {
+ httpRequest.open('GET', url + '?' + paramString);
+ httpRequest.send(null);
+
+ // request is less more then 2000 characters and the browser supports CORS, make POST request with XMLHttpRequest
+ } else if (requestLength > 2000 && Support.cors) {
+ httpRequest.open('POST', url);
+ httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ httpRequest.send(paramString);
+
+ // request is less more then 2000 characters and the browser does not support CORS, make a JSONP request
+ } else if (requestLength <= 2000 && !Support.cors) {
+ return jsonp(url, params, callback, context);
+
+ // request is longer then 2000 characters and the browser does not support CORS, log a warning
+ } else {
+ warn('a request to ' + url + ' was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html');
+ return;
+ }
+
+ return httpRequest;
+ }
+
+ function jsonp (url, params, callback, context) {
+ window._EsriLeafletCallbacks = window._EsriLeafletCallbacks || {};
+ var callbackId = 'c' + callbacks;
+
+ params.callback = 'window._EsriLeafletCallbacks.' + callbackId;
+
+ var script = L.DomUtil.create('script', null, document.body);
+ script.type = 'text/javascript';
+ script.src = url + '?' + serialize(params);
+ script.id = callbackId;
+
+ window._EsriLeafletCallbacks[callbackId] = function (response) {
+ if (window._EsriLeafletCallbacks[callbackId] !== true) {
+ var error;
+ var responseType = Object.prototype.toString.call(response);
+
+ if (!(responseType === '[object Object]' || responseType === '[object Array]')) {
+ error = {
+ error: {
+ code: 500,
+ message: 'Expected array or object as JSONP response'
+ }
+ };
+ response = null;
+ }
+
+ if (!error && response.error) {
+ error = response;
+ response = null;
+ }
+
+ callback.call(context, error, response);
+ window._EsriLeafletCallbacks[callbackId] = true;
+ }
+ };
+
+ callbacks++;
+
+ return {
+ id: callbackId,
+ url: script.src,
+ abort: function () {
+ window._EsriLeafletCallbacks._callback[callbackId]({
+ code: 0,
+ message: 'Request aborted.'
+ });
+ }
+ };
+ }
+
+ var get = ((Support.cors) ? xmlHttpGet : jsonp);
+ get.CORS = xmlHttpGet;
+ get.JSONP = jsonp;
+
+ // export the Request object to call the different handlers for debugging
+ var Request = {
+ request: request,
+ get: get,
+ post: xmlHttpPost
+ };
+
+ var Task = L.Class.extend({
+
+ options: {
+ proxy: false,
+ useCors: cors
+ },
+
+ // Generate a method for each methodName:paramName in the setters for this task.
+ generateSetter: function (param, context) {
+ return L.Util.bind(function (value) {
+ this.params[param] = value;
+ return this;
+ }, context);
+ },
+
+ initialize: function (endpoint) {
+ // endpoint can be either a url (and options) for an ArcGIS Rest Service or an instance of EsriLeaflet.Service
+ if (endpoint.request && endpoint.options) {
+ this._service = endpoint;
+ L.Util.setOptions(this, endpoint.options);
+ } else {
+ L.Util.setOptions(this, endpoint);
+ this.options.url = cleanUrl(endpoint.url);
+ }
+
+ // clone default params into this object
+ this.params = L.Util.extend({}, this.params || {});
+
+ // generate setter methods based on the setters object implimented a child class
+ if (this.setters) {
+ for (var setter in this.setters) {
+ var param = this.setters[setter];
+ this[setter] = this.generateSetter(param, this);
+ }
+ }
+ },
+
+ token: function (token) {
+ if (this._service) {
+ this._service.authenticate(token);
+ } else {
+ this.params.token = token;
+ }
+ return this;
+ },
+
+ request: function (callback, context) {
+ if (this._service) {
+ return this._service.request(this.path, this.params, callback, context);
+ }
+
+ return this._request('request', this.path, this.params, callback, context);
+ },
+
+ _request: function (method, path, params, callback, context) {
+ var url = (this.options.proxy) ? this.options.proxy + '?' + this.options.url + path : this.options.url + path;
+
+ if ((method === 'get' || method === 'request') && !this.options.useCors) {
+ return Request.get.JSONP(url, params, callback, context);
+ }
+
+ return Request[method](url, params, callback, context);
+ }
+ });
+
+ function task (options) {
+ return new Task(options);
+ }
+
+ var Query = Task.extend({
+ setters: {
+ 'offset': 'offset',
+ 'limit': 'limit',
+ 'fields': 'outFields',
+ 'precision': 'geometryPrecision',
+ 'featureIds': 'objectIds',
+ 'returnGeometry': 'returnGeometry',
+ 'token': 'token'
+ },
+
+ path: 'query',
+
+ params: {
+ returnGeometry: true,
+ where: '1=1',
+ outSr: 4326,
+ outFields: '*'
+ },
+
+ within: function (geometry) {
+ this._setGeometry(geometry);
+ this.params.spatialRel = 'esriSpatialRelContains'; // will make code read layer within geometry, to the api this will reads geometry contains layer
+ return this;
+ },
+
+ intersects: function (geometry) {
+ this._setGeometry(geometry);
+ this.params.spatialRel = 'esriSpatialRelIntersects';
+ return this;
+ },
+
+ contains: function (geometry) {
+ this._setGeometry(geometry);
+ this.params.spatialRel = 'esriSpatialRelWithin'; // will make code read layer contains geometry, to the api this will reads geometry within layer
+ return this;
+ },
+
+ crosses: function (geometry) {
+ this._setGeometry(geometry);
+ this.params.spatialRel = 'esriSpatialRelCrosses';
+ return this;
+ },
+
+ touches: function (geometry) {
+ this._setGeometry(geometry);
+ this.params.spatialRel = 'esriSpatialRelTouches';
+ return this;
+ },
+
+ overlaps: function (geometry) {
+ this._setGeometry(geometry);
+ this.params.spatialRel = 'esriSpatialRelOverlaps';
+ return this;
+ },
+
+ // only valid for Feature Services running on ArcGIS Server 10.3 or ArcGIS Online
+ nearby: function (latlng, radius) {
+ latlng = L.latLng(latlng);
+ this.params.geometry = [latlng.lng, latlng.lat];
+ this.params.geometryType = 'esriGeometryPoint';
+ this.params.spatialRel = 'esriSpatialRelIntersects';
+ this.params.units = 'esriSRUnit_Meter';
+ this.params.distance = radius;
+ this.params.inSr = 4326;
+ return this;
+ },
+
+ where: function (string) {
+ // instead of converting double-quotes to single quotes, pass as is, and provide a more informative message if a 400 is encountered
+ this.params.where = string;
+ return this;
+ },
+
+ between: function (start, end) {
+ this.params.time = [start.valueOf(), end.valueOf()];
+ return this;
+ },
+
+ simplify: function (map, factor) {
+ var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());
+ this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;
+ return this;
+ },
+
+ orderBy: function (fieldName, order) {
+ order = order || 'ASC';
+ this.params.orderByFields = (this.params.orderByFields) ? this.params.orderByFields + ',' : '';
+ this.params.orderByFields += ([fieldName, order]).join(' ');
+ return this;
+ },
+
+ run: function (callback, context) {
+ this._cleanParams();
+
+ // if the service is hosted on arcgis online request geojson directly
+ if (Util.isArcgisOnline(this.options.url)) {
+ this.params.f = 'geojson';
+
+ return this.request(function (error, response) {
+ this._trapSQLerrors(error);
+ callback.call(context, error, response, response);
+ }, this);
+
+ // otherwise convert it in the callback then pass it on
+ } else {
+ return this.request(function (error, response) {
+ this._trapSQLerrors(error);
+ callback.call(context, error, (response && Util.responseToFeatureCollection(response)), response);
+ }, this);
+ }
+ },
+
+ count: function (callback, context) {
+ this._cleanParams();
+ this.params.returnCountOnly = true;
+ return this.request(function (error, response) {
+ callback.call(this, error, (response && response.count), response);
+ }, context);
+ },
+
+ ids: function (callback, context) {
+ this._cleanParams();
+ this.params.returnIdsOnly = true;
+ return this.request(function (error, response) {
+ callback.call(this, error, (response && response.objectIds), response);
+ }, context);
+ },
+
+ // only valid for Feature Services running on ArcGIS Server 10.3 or ArcGIS Online
+ bounds: function (callback, context) {
+ this._cleanParams();
+ this.params.returnExtentOnly = true;
+ return this.request(function (error, response) {
+ callback.call(context, error, (response && response.extent && Util.extentToBounds(response.extent)), response);
+ }, context);
+ },
+
+ // only valid for image services
+ pixelSize: function (point) {
+ point = L.point(point);
+ this.params.pixelSize = [point.x, point.y];
+ return this;
+ },
+
+ // only valid for map services
+ layer: function (layer) {
+ this.path = layer + '/query';
+ return this;
+ },
+
+ _trapSQLerrors: function (error) {
+ if (error) {
+ if (error.code === '400') {
+ Util.warn('one common syntax error in query requests is encasing string values in double quotes instead of single quotes');
+ }
+ }
+ },
+
+ _cleanParams: function () {
+ delete this.params.returnIdsOnly;
+ delete this.params.returnExtentOnly;
+ delete this.params.returnCountOnly;
+ },
+
+ _setGeometry: function (geometry) {
+ this.params.inSr = 4326;
+
+ // convert bounds to extent and finish
+ if (geometry instanceof L.LatLngBounds) {
+ // set geometry + geometryType
+ this.params.geometry = Util.boundsToExtent(geometry);
+ this.params.geometryType = 'esriGeometryEnvelope';
+ return;
+ }
+
+ // convert L.Marker > L.LatLng
+ if (geometry.getLatLng) {
+ geometry = geometry.getLatLng();
+ }
+
+ // convert L.LatLng to a geojson point and continue;
+ if (geometry instanceof L.LatLng) {
+ geometry = {
+ type: 'Point',
+ coordinates: [geometry.lng, geometry.lat]
+ };
+ }
+
+ // handle L.GeoJSON, pull out the first geometry
+ if (geometry instanceof L.GeoJSON) {
+ // reassign geometry to the GeoJSON value (we are assuming that only one feature is present)
+ geometry = geometry.getLayers()[0].feature.geometry;
+ this.params.geometry = Util.geojsonToArcGIS(geometry);
+ this.params.geometryType = Util.geojsonTypeToArcGIS(geometry.type);
+ }
+
+ // Handle L.Polyline and L.Polygon
+ if (geometry.toGeoJSON) {
+ geometry = geometry.toGeoJSON();
+ }
+
+ // handle GeoJSON feature by pulling out the geometry
+ if (geometry.type === 'Feature') {
+ // get the geometry of the geojson feature
+ geometry = geometry.geometry;
+ }
+
+ // confirm that our GeoJSON is a point, line or polygon
+ if (geometry.type === 'Point' || geometry.type === 'LineString' || geometry.type === 'Polygon') {
+ this.params.geometry = Util.geojsonToArcGIS(geometry);
+ this.params.geometryType = Util.geojsonTypeToArcGIS(geometry.type);
+ return;
+ }
+
+ // warn the user if we havn't found a
+ /* global console */
+ Util.warn('invalid geometry passed to spatial query. Should be an L.LatLng, L.LatLngBounds or L.Marker or a GeoJSON Point Line or Polygon object');
+
+ return;
+ }
+ });
+
+ function query (options) {
+ return new Query(options);
+ }
+
+ var Find = Task.extend({
+ setters: {
+ // method name > param name
+ 'contains': 'contains',
+ 'text': 'searchText',
+ 'fields': 'searchFields', // denote an array or single string
+ 'spatialReference': 'sr',
+ 'sr': 'sr',
+ 'layers': 'layers',
+ 'returnGeometry': 'returnGeometry',
+ 'maxAllowableOffset': 'maxAllowableOffset',
+ 'precision': 'geometryPrecision',
+ 'dynamicLayers': 'dynamicLayers',
+ 'returnZ': 'returnZ',
+ 'returnM': 'returnM',
+ 'gdbVersion': 'gdbVersion',
+ 'token': 'token'
+ },
+
+ path: 'find',
+
+ params: {
+ sr: 4326,
+ contains: true,
+ returnGeometry: true,
+ returnZ: true,
+ returnM: false
+ },
+
+ layerDefs: function (id, where) {
+ this.params.layerDefs = (this.params.layerDefs) ? this.params.layerDefs + ';' : '';
+ this.params.layerDefs += ([id, where]).join(':');
+ return this;
+ },
+
+ simplify: function (map, factor) {
+ var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());
+ this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;
+ return this;
+ },
+
+ run: function (callback, context) {
+ return this.request(function (error, response) {
+ callback.call(context, error, (response && Util.responseToFeatureCollection(response)), response);
+ }, context);
+ }
+ });
+
+ function find (options) {
+ return new Find(options);
+ }
+
+ var Identify = Task.extend({
+ path: 'identify',
+
+ between: function (start, end) {
+ this.params.time = [start.valueOf(), end.valueOf()];
+ return this;
+ }
+ });
+
+ function identify (options) {
+ return new Identify(options);
+ }
+
+ var IdentifyFeatures = Identify.extend({
+ setters: {
+ 'layers': 'layers',
+ 'precision': 'geometryPrecision',
+ 'tolerance': 'tolerance',
+ 'returnGeometry': 'returnGeometry'
+ },
+
+ params: {
+ sr: 4326,
+ layers: 'all',
+ tolerance: 3,
+ returnGeometry: true
+ },
+
+ on: function (map) {
+ var extent = Util.boundsToExtent(map.getBounds());
+ var size = map.getSize();
+ this.params.imageDisplay = [size.x, size.y, 96];
+ this.params.mapExtent = [extent.xmin, extent.ymin, extent.xmax, extent.ymax];
+ return this;
+ },
+
+ at: function (latlng) {
+ latlng = L.latLng(latlng);
+ this.params.geometry = [latlng.lng, latlng.lat];
+ this.params.geometryType = 'esriGeometryPoint';
+ return this;
+ },
+
+ layerDef: function (id, where) {
+ this.params.layerDefs = (this.params.layerDefs) ? this.params.layerDefs + ';' : '';
+ this.params.layerDefs += ([id, where]).join(':');
+ return this;
+ },
+
+ simplify: function (map, factor) {
+ var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());
+ this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * (1 - factor);
+ return this;
+ },
+
+ run: function (callback, context) {
+ return this.request(function (error, response) {
+ // immediately invoke with an error
+ if (error) {
+ callback.call(context, error, undefined, response);
+ return;
+
+ // ok no error lets just assume we have features...
+ } else {
+ var featureCollection = Util.responseToFeatureCollection(response);
+ response.results = response.results.reverse();
+ for (var i = 0; i < featureCollection.features.length; i++) {
+ var feature = featureCollection.features[i];
+ feature.layerId = response.results[i].layerId;
+ }
+ callback.call(context, undefined, featureCollection, response);
+ }
+ });
+ }
+ });
+
+ function identifyFeatures (options) {
+ return new IdentifyFeatures(options);
+ }
+
+ var IdentifyImage = Identify.extend({
+ setters: {
+ 'setMosaicRule': 'mosaicRule',
+ 'setRenderingRule': 'renderingRule',
+ 'setPixelSize': 'pixelSize',
+ 'returnCatalogItems': 'returnCatalogItems',
+ 'returnGeometry': 'returnGeometry'
+ },
+
+ params: {
+ returnGeometry: false
+ },
+
+ at: function (latlng) {
+ latlng = L.latLng(latlng);
+ this.params.geometry = JSON.stringify({
+ x: latlng.lng,
+ y: latlng.lat,
+ spatialReference: {
+ wkid: 4326
+ }
+ });
+ this.params.geometryType = 'esriGeometryPoint';
+ return this;
+ },
+
+ getMosaicRule: function () {
+ return this.params.mosaicRule;
+ },
+
+ getRenderingRule: function () {
+ return this.params.renderingRule;
+ },
+
+ getPixelSize: function () {
+ return this.params.pixelSize;
+ },
+
+ run: function (callback, context) {
+ return this.request(function (error, response) {
+ callback.call(context, error, (response && this._responseToGeoJSON(response)), response);
+ }, this);
+ },
+
+ // get pixel data and return as geoJSON point
+ // populate catalog items (if any)
+ // merging in any catalogItemVisibilities as a propery of each feature
+ _responseToGeoJSON: function (response) {
+ var location = response.location;
+ var catalogItems = response.catalogItems;
+ var catalogItemVisibilities = response.catalogItemVisibilities;
+ var geoJSON = {
+ 'pixel': {
+ 'type': 'Feature',
+ 'geometry': {
+ 'type': 'Point',
+ 'coordinates': [location.x, location.y]
+ },
+ 'crs': {
+ 'type': 'EPSG',
+ 'properties': {
+ 'code': location.spatialReference.wkid
+ }
+ },
+ 'properties': {
+ 'OBJECTID': response.objectId,
+ 'name': response.name,
+ 'value': response.value
+ },
+ 'id': response.objectId
+ }
+ };
+
+ if (response.properties && response.properties.Values) {
+ geoJSON.pixel.properties.values = response.properties.Values;
+ }
+
+ if (catalogItems && catalogItems.features) {
+ geoJSON.catalogItems = Util.responseToFeatureCollection(catalogItems);
+ if (catalogItemVisibilities && catalogItemVisibilities.length === geoJSON.catalogItems.features.length) {
+ for (var i = catalogItemVisibilities.length - 1; i >= 0; i--) {
+ geoJSON.catalogItems.features[i].properties.catalogItemVisibility = catalogItemVisibilities[i];
+ }
+ }
+ }
+ return geoJSON;
+ }
+
+ });
+
+ function identifyImage (params) {
+ return new IdentifyImage(params);
+ }
+
+ var Service = L.Evented.extend({
+
+ options: {
+ proxy: false,
+ useCors: cors,
+ timeout: 0
+ },
+
+ initialize: function (options) {
+ options = options || {};
+ this._requestQueue = [];
+ this._authenticating = false;
+ L.Util.setOptions(this, options);
+ this.options.url = cleanUrl(this.options.url);
+ },
+
+ get: function (path, params, callback, context) {
+ return this._request('get', path, params, callback, context);
+ },
+
+ post: function (path, params, callback, context) {
+ return this._request('post', path, params, callback, context);
+ },
+
+ request: function (path, params, callback, context) {
+ return this._request('request', path, params, callback, context);
+ },
+
+ metadata: function (callback, context) {
+ return this._request('get', '', {}, callback, context);
+ },
+
+ authenticate: function (token) {
+ this._authenticating = false;
+ this.options.token = token;
+ this._runQueue();
+ return this;
+ },
+
+ getTimeout: function () {
+ return this.options.timeout;
+ },
+
+ setTimeout: function (timeout) {
+ this.options.timeout = timeout;
+ },
+
+ _request: function (method, path, params, callback, context) {
+ this.fire('requeststart', {
+ url: this.options.url + path,
+ params: params,
+ method: method
+ }, true);
+
+ var wrappedCallback = this._createServiceCallback(method, path, params, callback, context);
+
+ if (this.options.token) {
+ params.token = this.options.token;
+ }
+
+ if (this._authenticating) {
+ this._requestQueue.push([method, path, params, callback, context]);
+ return;
+ } else {
+ var url = (this.options.proxy) ? this.options.proxy + '?' + this.options.url + path : this.options.url + path;
+
+ if ((method === 'get' || method === 'request') && !this.options.useCors) {
+ return Request.get.JSONP(url, params, wrappedCallback, context);
+ } else {
+ return Request[method](url, params, wrappedCallback, context);
+ }
+ }
+ },
+
+ _createServiceCallback: function (method, path, params, callback, context) {
+ return L.Util.bind(function (error, response) {
+ if (error && (error.code === 499 || error.code === 498)) {
+ this._authenticating = true;
+
+ this._requestQueue.push([method, path, params, callback, context]);
+
+ // fire an event for users to handle and re-authenticate
+ this.fire('authenticationrequired', {
+ authenticate: L.Util.bind(this.authenticate, this)
+ }, true);
+
+ // if the user has access to a callback they can handle the auth error
+ error.authenticate = L.Util.bind(this.authenticate, this);
+ }
+
+ callback.call(context, error, response);
+
+ if (error) {
+ this.fire('requesterror', {
+ url: this.options.url + path,
+ params: params,
+ message: error.message,
+ code: error.code,
+ method: method
+ }, true);
+ } else {
+ this.fire('requestsuccess', {
+ url: this.options.url + path,
+ params: params,
+ response: response,
+ method: method
+ }, true);
+ }
+
+ this.fire('requestend', {
+ url: this.options.url + path,
+ params: params,
+ method: method
+ }, true);
+ }, this);
+ },
+
+ _runQueue: function () {
+ for (var i = this._requestQueue.length - 1; i >= 0; i--) {
+ var request = this._requestQueue[i];
+ var method = request.shift();
+ this[method].apply(this, request);
+ }
+ this._requestQueue = [];
+ }
+ });
+
+ function service (options) {
+ return new Service(options);
+ }
+
+ var MapService = Service.extend({
+
+ identify: function () {
+ return identifyFeatures(this);
+ },
+
+ find: function () {
+ return find(this);
+ },
+
+ query: function () {
+ return query(this);
+ }
+
+ });
+
+ function mapService (options) {
+ return new MapService(options);
+ }
+
+ var ImageService = Service.extend({
+
+ query: function () {
+ return query(this);
+ },
+
+ identify: function () {
+ return identifyImage(this);
+ }
+ });
+
+ function imageService (options) {
+ return new ImageService(options);
+ }
+
+ var FeatureLayerService = Service.extend({
+
+ options: {
+ idAttribute: 'OBJECTID'
+ },
+
+ query: function () {
+ return query(this);
+ },
+
+ addFeature: function (feature, callback, context) {
+ delete feature.id;
+
+ feature = geojsonToArcGIS(feature);
+
+ return this.post('addFeatures', {
+ features: [feature]
+ }, function (error, response) {
+ var result = (response && response.addResults) ? response.addResults[0] : undefined;
+ if (callback) {
+ callback.call(context, error || response.addResults[0].error, result);
+ }
+ }, context);
+ },
+
+ updateFeature: function (feature, callback, context) {
+ feature = geojsonToArcGIS(feature, this.options.idAttribute);
+
+ return this.post('updateFeatures', {
+ features: [feature]
+ }, function (error, response) {
+ var result = (response && response.updateResults) ? response.updateResults[0] : undefined;
+ if (callback) {
+ callback.call(context, error || response.updateResults[0].error, result);
+ }
+ }, context);
+ },
+
+ deleteFeature: function (id, callback, context) {
+ return this.post('deleteFeatures', {
+ objectIds: id
+ }, function (error, response) {
+ var result = (response && response.deleteResults) ? response.deleteResults[0] : undefined;
+ if (callback) {
+ callback.call(context, error || response.deleteResults[0].error, result);
+ }
+ }, context);
+ },
+
+ deleteFeatures: function (ids, callback, context) {
+ return this.post('deleteFeatures', {
+ objectIds: ids
+ }, function (error, response) {
+ // pass back the entire array
+ var result = (response && response.deleteResults) ? response.deleteResults : undefined;
+ if (callback) {
+ callback.call(context, error || response.deleteResults[0].error, result);
+ }
+ }, context);
+ }
+ });
+
+ function featureLayerService (options) {
+ return new FeatureLayerService(options);
+ }
+
+ var Logo = L.Control.extend({
+ options: {
+ position: 'bottomright',
+ marginTop: 0,
+ marginLeft: 0,
+ marginBottom: 0,
+ marginRight: 0
+ },
+
+ onAdd: function () {
+ var div = L.DomUtil.create('div', 'esri-leaflet-logo');
+ div.style.marginTop = this.options.marginTop;
+ div.style.marginLeft = this.options.marginLeft;
+ div.style.marginBottom = this.options.marginBottom;
+ div.style.marginRight = this.options.marginRight;
+ div.innerHTML = '';
+
+ return div;
+ }
+ });
+
+ function logo (options) {
+ return new Logo(options);
+ }
+
+ var tileProtocol = (window.location.protocol !== 'https:') ? 'http:' : 'https:';
+
+ var BasemapLayer = L.TileLayer.extend({
+ statics: {
+ TILES: {
+ Streets: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
+ attributionUrl: 'https://static.arcgis.com/attribution/World_Street_Map',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 19,
+ subdomains: ['server', 'services'],
+ attribution: 'Esri'
+ }
+ },
+ Topographic: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}',
+ attributionUrl: 'https://static.arcgis.com/attribution/World_Topo_Map',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 19,
+ subdomains: ['server', 'services'],
+ attribution: 'Esri'
+ }
+ },
+ Oceans: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}',
+ attributionUrl: 'https://static.arcgis.com/attribution/Ocean_Basemap',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 16,
+ subdomains: ['server', 'services'],
+ attribution: 'Esri'
+ }
+ },
+ OceansLabels: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: true,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 16,
+ subdomains: ['server', 'services'],
+ pane: (pointerEvents) ? 'esri-labels' : 'tilePane'
+ }
+ },
+ NationalGeographic: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 16,
+ subdomains: ['server', 'services'],
+ attribution: 'National Geographic, Esri, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp.'
+ }
+ },
+ DarkGray: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 16,
+ subdomains: ['server', 'services'],
+ attribution: 'Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors'
+ }
+ },
+ DarkGrayLabels: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: true,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 16,
+ subdomains: ['server', 'services'],
+ pane: (pointerEvents) ? 'esri-labels' : 'tilePane'
+
+ }
+ },
+ Gray: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 16,
+ subdomains: ['server', 'services'],
+ attribution: 'Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors'
+ }
+ },
+ GrayLabels: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: true,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 16,
+ subdomains: ['server', 'services'],
+ pane: (pointerEvents) ? 'esri-labels' : 'tilePane'
+ }
+ },
+ Imagery: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 19,
+ subdomains: ['server', 'services'],
+ attribution: 'Esri, DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community'
+ }
+ },
+ ImageryLabels: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: true,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 19,
+ subdomains: ['server', 'services'],
+ pane: (pointerEvents) ? 'esri-labels' : 'tilePane'
+ }
+ },
+ ImageryTransportation: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: true,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 19,
+ subdomains: ['server', 'services'],
+ pane: (pointerEvents) ? 'esri-labels' : 'tilePane'
+ }
+ },
+ ShadedRelief: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 13,
+ subdomains: ['server', 'services'],
+ attribution: 'Esri, USGS'
+ }
+ },
+ ShadedReliefLabels: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: true,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 12,
+ subdomains: ['server', 'services'],
+ pane: (pointerEvents) ? 'esri-labels' : 'tilePane'
+ }
+ },
+ Terrain: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: false,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 13,
+ subdomains: ['server', 'services'],
+ attribution: 'Esri, USGS, NOAA'
+ }
+ },
+ TerrainLabels: {
+ urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}',
+ options: {
+ hideLogo: true,
+ logoPosition: 'bottomright',
+ minZoom: 1,
+ maxZoom: 13,
+ subdomains: ['server', 'services'],
+ pane: (pointerEvents) ? 'esri-labels' : 'tilePane'
+ }
+ }
+ }
+ },
+ initialize: function (key, options) {
+ var config;
+
+ // set the config variable with the appropriate config object
+ if (typeof key === 'object' && key.urlTemplate && key.options) {
+ config = key;
+ } else if (typeof key === 'string' && BasemapLayer.TILES[key]) {
+ config = BasemapLayer.TILES[key];
+ } else {
+ throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of "Streets", "Topographic", "Oceans", "OceansLabels", "NationalGeographic", "Gray", "GrayLabels", "DarkGray", "DarkGrayLabels", "Imagery", "ImageryLabels", "ImageryTransportation", "ShadedRelief", "ShadedReliefLabels", "Terrain" or "TerrainLabels"');
+ }
+
+ // merge passed options into the config options
+ var tileOptions = L.Util.extend(config.options, options);
+
+ L.Util.setOptions(this, tileOptions);
+
+ // call the initialize method on L.TileLayer to set everything up
+ L.TileLayer.prototype.initialize.call(this, config.urlTemplate, tileOptions);
+
+ // if this basemap requires dynamic attribution set it up
+ if (config.attributionUrl) {
+ this._getAttributionData(config.attributionUrl);
+ }
+
+ this._logo = logo({
+ position: this.options.logoPosition
+ });
+ },
+
+ onAdd: function (map) {
+ if (!this.options.hideLogo && !map._hasEsriLogo) {
+ this._logo.addTo(map);
+ map._hasEsriLogo = true;
+ }
+
+ if (this.options.pane === 'esri-labels') {
+ this._initPane();
+ }
+
+ map.on('moveend', this._updateMapAttribution, this);
+
+ L.TileLayer.prototype.onAdd.call(this, map);
+ },
+
+ onRemove: function (map) {
+ // check to make sure the logo hasn't already been removed
+ if (this._logo && this._logo._container) {
+ map.removeControl(this._logo);
+ map._hasEsriLogo = false;
+ }
+
+ map.off('moveend', this._updateMapAttribution, this);
+
+ L.TileLayer.prototype.onRemove.call(this, map);
+ },
+
+ getAttribution: function () {
+ if (this.options.attribution) {
+ var attribution = '' + this.options.attribution + '';
+ }
+ return attribution;
+ },
+
+ _initPane: function () {
+ if (!this._map.getPane(this.options.pane)) {
+ var pane = this._map.createPane(this.options.pane);
+ pane.style.pointerEvents = 'none';
+ pane.style.zIndex = 500;
+ }
+ },
+
+ _getAttributionData: function (url) {
+ jsonp(url, {}, L.Util.bind(function (error, attributions) {
+ if (error) { return; }
+ this._attributions = [];
+
+ for (var c = 0; c < attributions.contributors.length; c++) {
+ var contributor = attributions.contributors[c];
+ for (var i = 0; i < contributor.coverageAreas.length; i++) {
+ var coverageArea = contributor.coverageAreas[i];
+ var southWest = L.latLng(coverageArea.bbox[0], coverageArea.bbox[1]);
+ var northEast = L.latLng(coverageArea.bbox[2], coverageArea.bbox[3]);
+ this._attributions.push({
+ attribution: contributor.attribution,
+ score: coverageArea.score,
+ bounds: L.latLngBounds(southWest, northEast),
+ minZoom: coverageArea.zoomMin,
+ maxZoom: coverageArea.zoomMax
+ });
+ }
+ }
+
+ this._attributions.sort(function (a, b) {
+ return b.score - a.score;
+ });
+
+ this._updateMapAttribution();
+ }, this));
+ },
+
+ _updateMapAttribution: function () {
+ if (this._map && this._map.attributionControl && this._attributions) {
+ var newAttributions = '';
+ var bounds = this._map.getBounds();
+ var zoom = this._map.getZoom();
+
+ for (var i = 0; i < this._attributions.length; i++) {
+ var attribution = this._attributions[i];
+ var text = attribution.attribution;
+ if (!newAttributions.match(text) && bounds.intersects(attribution.bounds) && zoom >= attribution.minZoom && zoom <= attribution.maxZoom) {
+ newAttributions += (', ' + text);
+ }
+ }
+ newAttributions = newAttributions.substr(2);
+ var attributionElement = this._map.attributionControl._container.querySelector('.esri-attributions');
+
+ attributionElement.innerHTML = newAttributions;
+ attributionElement.style.maxWidth = (this._map.getSize().x * 0.65) + 'px';
+
+ this.fire('attributionupdated', {
+ attribution: newAttributions
+ });
+ }
+ }
+ });
+
+ function basemapLayer (key, options) {
+ return new BasemapLayer(key, options);
+ }
+
+ var TiledMapLayer = L.TileLayer.extend({
+ options: {
+ zoomOffsetAllowance: 0.1
+ },
+
+ statics: {
+ MercatorZoomLevels: {
+ '0': 156543.03392799999,
+ '1': 78271.516963999893,
+ '2': 39135.758482000099,
+ '3': 19567.879240999901,
+ '4': 9783.9396204999593,
+ '5': 4891.9698102499797,
+ '6': 2445.9849051249898,
+ '7': 1222.9924525624899,
+ '8': 611.49622628138002,
+ '9': 305.74811314055802,
+ '10': 152.874056570411,
+ '11': 76.437028285073197,
+ '12': 38.218514142536598,
+ '13': 19.109257071268299,
+ '14': 9.5546285356341496,
+ '15': 4.7773142679493699,
+ '16': 2.38865713397468,
+ '17': 1.1943285668550501,
+ '18': 0.59716428355981699,
+ '19': 0.29858214164761698,
+ '20': 0.14929107082381,
+ '21': 0.07464553541191,
+ '22': 0.0373227677059525,
+ '23': 0.0186613838529763
+ }
+ },
+
+ initialize: function (options) {
+ options.url = cleanUrl(options.url);
+ options = L.Util.setOptions(this, options);
+
+ // set the urls
+ this.tileUrl = options.url + 'tile/{z}/{y}/{x}';
+ this.service = mapService(options);
+ this.service.addEventParent(this);
+
+ var arcgisonline = new RegExp(/tiles.arcgis(online)?\.com/g);
+ if (arcgisonline.test(options.url)) {
+ this.tileUrl = this.tileUrl.replace('://tiles', '://tiles{s}');
+ options.subdomains = ['1', '2', '3', '4'];
+ }
+
+ if (this.options.token) {
+ this.tileUrl += ('?token=' + this.options.token);
+ }
+
+ // init layer by calling TileLayers initialize method
+ L.TileLayer.prototype.initialize.call(this, this.tileUrl, options);
+ },
+
+ getTileUrl: function (tilePoint) {
+ return L.Util.template(this.tileUrl, L.extend({
+ s: this._getSubdomain(tilePoint),
+ z: (this._lodMap && this._lodMap[tilePoint.z]) ? this._lodMap[tilePoint.z] : tilePoint.z, // try lod map first, then just defualt to zoom level
+ x: tilePoint.x,
+ y: tilePoint.y
+ }, this.options));
+ },
+
+ createTile: function (coords, done) {
+ var tile = document.createElement('img');
+
+ L.DomEvent.on(tile, 'load', L.bind(this._tileOnLoad, this, done, tile));
+ L.DomEvent.on(tile, 'error', L.bind(this._tileOnError, this, done, tile));
+
+ if (this.options.crossOrigin) {
+ tile.crossOrigin = '';
+ }
+
+ /*
+ Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons
+ http://www.w3.org/TR/WCAG20-TECHS/H67
+ */
+ tile.alt = '';
+
+ // if there is no lod map or an lod map with a proper zoom load the tile
+ // otherwise wait for the lod map to become available
+ if (!this._lodMap || (this._lodMap && this._lodMap[coords.z])) {
+ tile.src = this.getTileUrl(coords);
+ } else {
+ this.once('lodmap', function () {
+ tile.src = this.getTileUrl(coords);
+ }, this);
+ }
+
+ return tile;
+ },
+
+ onAdd: function (map) {
+ if (map.options.crs === L.CRS.EPSG3857 && !this._lodMap) {
+ this._lodMap = {};
+ this.metadata(function (error, metadata) {
+ if (!error) {
+ var sr = metadata.spatialReference.latestWkid || metadata.spatialReference.wkid;
+ if (sr === 102100 || sr === 3857) {
+ // create the zoom level data
+ var arcgisLODs = metadata.tileInfo.lods;
+ var correctResolutions = TiledMapLayer.MercatorZoomLevels;
+
+ for (var i = 0; i < arcgisLODs.length; i++) {
+ var arcgisLOD = arcgisLODs[i];
+ for (var ci in correctResolutions) {
+ var correctRes = correctResolutions[ci];
+
+ if (this._withinPercentage(arcgisLOD.resolution, correctRes, this.options.zoomOffsetAllowance)) {
+ this._lodMap[ci] = arcgisLOD.level;
+ break;
+ }
+ }
+ }
+
+ this.fire('lodmap');
+ } else {
+ warn('L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet http://esri.github.io/esri-leaflet/examples/non-mercator-projection.html');
+ }
+ }
+ }, this);
+ }
+
+ L.TileLayer.prototype.onAdd.call(this, map);
+ },
+
+ metadata: function (callback, context) {
+ this.service.metadata(callback, context);
+ return this;
+ },
+
+ identify: function () {
+ return this.service.identify();
+ },
+
+ find: function () {
+ return this.service.find();
+ },
+
+ query: function () {
+ return this.service.query();
+ },
+
+ authenticate: function (token) {
+ var tokenQs = '?token=' + token;
+ this.tileUrl = (this.options.token) ? this.tileUrl.replace(/\?token=(.+)/g, tokenQs) : this.tileUrl + tokenQs;
+ this.options.token = token;
+ this.service.authenticate(token);
+ return this;
+ },
+
+ _withinPercentage: function (a, b, percentage) {
+ var diff = Math.abs((a / b) - 1);
+ return diff < percentage;
+ }
+ });
+
+ function tiledMapLayer (url, options) {
+ return new TiledMapLayer(url, options);
+ }
+
+ var Overlay = L.ImageOverlay.extend({
+ onAdd: function (map) {
+ this._topLeft = map.getPixelBounds().min;
+ L.ImageOverlay.prototype.onAdd.call(this, map);
+ },
+ _reset: function () {
+ if (this._map.options.crs === L.CRS.EPSG3857) {
+ L.ImageOverlay.prototype._reset.call(this);
+ } else {
+ L.DomUtil.setPosition(this._image, this._topLeft.subtract(this._map.getPixelOrigin()));
+ }
+ }
+ });
+
+ var RasterLayer = L.Layer.extend({
+
+ options: {
+ opacity: 1,
+ position: 'front',
+ f: 'image',
+ useCors: cors,
+ attribution: null,
+ interactive: false,
+ alt: ''
+ },
+
+ onAdd: function (map) {
+ this._update = L.Util.throttle(this._update, this.options.updateInterval, this);
+
+ map.on('moveend', this._update, this);
+
+ // if we had an image loaded and it matches the
+ // current bounds show the image otherwise remove it
+ if (this._currentImage && this._currentImage._bounds.equals(this._map.getBounds())) {
+ map.addLayer(this._currentImage);
+ } else if (this._currentImage) {
+ this._map.removeLayer(this._currentImage);
+ this._currentImage = null;
+ }
+
+ this._update();
+
+ if (this._popup) {
+ this._map.on('click', this._getPopupData, this);
+ this._map.on('dblclick', this._resetPopupState, this);
+ }
+ },
+
+ onRemove: function (map) {
+ if (this._currentImage) {
+ this._map.removeLayer(this._currentImage);
+ }
+
+ if (this._popup) {
+ this._map.off('click', this._getPopupData, this);
+ this._map.off('dblclick', this._resetPopupState, this);
+ }
+
+ this._map.off('moveend', this._update, this);
+ },
+
+ bindPopup: function (fn, popupOptions) {
+ this._shouldRenderPopup = false;
+ this._lastClick = false;
+ this._popup = L.popup(popupOptions);
+ this._popupFunction = fn;
+ if (this._map) {
+ this._map.on('click', this._getPopupData, this);
+ this._map.on('dblclick', this._resetPopupState, this);
+ }
+ return this;
+ },
+
+ unbindPopup: function () {
+ if (this._map) {
+ this._map.closePopup(this._popup);
+ this._map.off('click', this._getPopupData, this);
+ this._map.off('dblclick', this._resetPopupState, this);
+ }
+ this._popup = false;
+ return this;
+ },
+
+ bringToFront: function () {
+ this.options.position = 'front';
+ if (this._currentImage) {
+ this._currentImage.bringToFront();
+ }
+ return this;
+ },
+
+ bringToBack: function () {
+ this.options.position = 'back';
+ if (this._currentImage) {
+ this._currentImage.bringToBack();
+ }
+ return this;
+ },
+
+ getAttribution: function () {
+ return this.options.attribution;
+ },
+
+ getOpacity: function () {
+ return this.options.opacity;
+ },
+
+ setOpacity: function (opacity) {
+ this.options.opacity = opacity;
+ this._currentImage.setOpacity(opacity);
+ return this;
+ },
+
+ getTimeRange: function () {
+ return [this.options.from, this.options.to];
+ },
+
+ setTimeRange: function (from, to) {
+ this.options.from = from;
+ this.options.to = to;
+ this._update();
+ return this;
+ },
+
+ metadata: function (callback, context) {
+ this.service.metadata(callback, context);
+ return this;
+ },
+
+ authenticate: function (token) {
+ this.service.authenticate(token);
+ return this;
+ },
+
+ _renderImage: function (url, bounds) {
+ if (this._map) {
+ // create a new image overlay and add it to the map
+ // to start loading the image
+ // opacity is 0 while the image is loading
+ var image = new Overlay(url, bounds, {
+ opacity: 0,
+ crossOrigin: this.options.useCors,
+ alt: this.options.alt,
+ pane: this.options.pane || this.getPane(),
+ interactive: this.options.interactive
+ }).addTo(this._map);
+
+ // once the image loads
+ image.once('load', function (e) {
+ if (this._map) {
+ var newImage = e.target;
+ var oldImage = this._currentImage;
+
+ // if the bounds of this image matches the bounds that
+ // _renderImage was called with and we have a map with the same bounds
+ // hide the old image if there is one and set the opacity
+ // of the new image otherwise remove the new image
+ if (newImage._bounds.equals(bounds) && newImage._bounds.equals(this._map.getBounds())) {
+ this._currentImage = newImage;
+
+ if (this.options.position === 'front') {
+ this.bringToFront();
+ } else {
+ this.bringToBack();
+ }
+
+ if (this._map && this._currentImage._map) {
+ this._currentImage.setOpacity(this.options.opacity);
+ } else {
+ this._currentImage._map.removeLayer(this._currentImage);
+ }
+
+ if (oldImage && this._map) {
+ this._map.removeLayer(oldImage);
+ }
+
+ if (oldImage && oldImage._map) {
+ oldImage._map.removeLayer(oldImage);
+ }
+ } else {
+ this._map.removeLayer(newImage);
+ }
+ }
+
+ this.fire('load', {
+ bounds: bounds
+ });
+ }, this);
+
+ this.fire('loading', {
+ bounds: bounds
+ });
+ }
+ },
+
+ _update: function () {
+ if (!this._map) {
+ return;
+ }
+
+ var zoom = this._map.getZoom();
+ var bounds = this._map.getBounds();
+
+ if (this._animatingZoom) {
+ return;
+ }
+
+ if (this._map._panTransition && this._map._panTransition._inProgress) {
+ return;
+ }
+
+ if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {
+ this._currentImage._map.removeLayer(this._currentImage);
+ return;
+ }
+
+ var params = this._buildExportParams();
+
+ this._requestExport(params, bounds);
+ },
+
+ _renderPopup: function (latlng, error, results, response) {
+ latlng = L.latLng(latlng);
+ if (this._shouldRenderPopup && this._lastClick.equals(latlng)) {
+ // add the popup to the map where the mouse was clicked at
+ var content = this._popupFunction(error, results, response);
+ if (content) {
+ this._popup.setLatLng(latlng).setContent(content).openOn(this._map);
+ }
+ }
+ },
+
+ _resetPopupState: function (e) {
+ this._shouldRenderPopup = false;
+ this._lastClick = e.latlng;
+ }
+ });
+
+ var ImageMapLayer = RasterLayer.extend({
+
+ options: {
+ updateInterval: 150,
+ format: 'jpgpng',
+ transparent: true,
+ f: 'json'
+ },
+
+ query: function () {
+ return this.service.query();
+ },
+
+ identify: function () {
+ return this.service.identify();
+ },
+
+ initialize: function (options) {
+ options.url = cleanUrl(options.url);
+ this.service = imageService(options);
+ this.service.addEventParent(this);
+
+ L.Util.setOptions(this, options);
+ },
+
+ setPixelType: function (pixelType) {
+ this.options.pixelType = pixelType;
+ this._update();
+ return this;
+ },
+
+ getPixelType: function () {
+ return this.options.pixelType;
+ },
+
+ setBandIds: function (bandIds) {
+ if (L.Util.isArray(bandIds)) {
+ this.options.bandIds = bandIds.join(',');
+ } else {
+ this.options.bandIds = bandIds.toString();
+ }
+ this._update();
+ return this;
+ },
+
+ getBandIds: function () {
+ return this.options.bandIds;
+ },
+
+ setNoData: function (noData, noDataInterpretation) {
+ if (L.Util.isArray(noData)) {
+ this.options.noData = noData.join(',');
+ } else {
+ this.options.noData = noData.toString();
+ }
+ if (noDataInterpretation) {
+ this.options.noDataInterpretation = noDataInterpretation;
+ }
+ this._update();
+ return this;
+ },
+
+ getNoData: function () {
+ return this.options.noData;
+ },
+
+ getNoDataInterpretation: function () {
+ return this.options.noDataInterpretation;
+ },
+
+ setRenderingRule: function (renderingRule) {
+ this.options.renderingRule = renderingRule;
+ this._update();
+ },
+
+ getRenderingRule: function () {
+ return this.options.renderingRule;
+ },
+
+ setMosaicRule: function (mosaicRule) {
+ this.options.mosaicRule = mosaicRule;
+ this._update();
+ },
+
+ getMosaicRule: function () {
+ return this.options.mosaicRule;
+ },
+
+ _getPopupData: function (e) {
+ var callback = L.Util.bind(function (error, results, response) {
+ if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire
+ setTimeout(L.Util.bind(function () {
+ this._renderPopup(e.latlng, error, results, response);
+ }, this), 300);
+ }, this);
+
+ var identifyRequest = this.identify().at(e.latlng);
+
+ // set mosaic rule for identify task if it is set for layer
+ if (this.options.mosaicRule) {
+ identifyRequest.setMosaicRule(this.options.mosaicRule);
+ // @TODO: force return catalog items too?
+ }
+
+ // @TODO: set rendering rule? Not sure,
+ // sometimes you want raw pixel values
+ // if (this.options.renderingRule) {
+ // identifyRequest.setRenderingRule(this.options.renderingRule);
+ // }
+
+ identifyRequest.run(callback);
+
+ // set the flags to show the popup
+ this._shouldRenderPopup = true;
+ this._lastClick = e.latlng;
+ },
+
+ _buildExportParams: function () {
+ var bounds = this._map.getBounds();
+ var size = this._map.getSize();
+ var ne = this._map.options.crs.project(bounds._northEast);
+ var sw = this._map.options.crs.project(bounds._southWest);
+ var sr = parseInt(this._map.options.crs.code.split(':')[1], 10);
+
+ var params = {
+ bbox: [sw.x, sw.y, ne.x, ne.y].join(','),
+ size: size.x + ',' + size.y,
+ format: this.options.format,
+ transparent: this.options.transparent,
+ bboxSR: sr,
+ imageSR: sr
+ };
+
+ if (this.options.from && this.options.to) {
+ params.time = this.options.from.valueOf() + ',' + this.options.to.valueOf();
+ }
+
+ if (this.options.pixelType) {
+ params.pixelType = this.options.pixelType;
+ }
+
+ if (this.options.interpolation) {
+ params.interpolation = this.options.interpolation;
+ }
+
+ if (this.options.compressionQuality) {
+ params.compressionQuality = this.options.compressionQuality;
+ }
+
+ if (this.options.bandIds) {
+ params.bandIds = this.options.bandIds;
+ }
+
+ if (this.options.noData) {
+ params.noData = this.options.noData;
+ }
+
+ if (this.options.noDataInterpretation) {
+ params.noDataInterpretation = this.options.noDataInterpretation;
+ }
+
+ if (this.service.options.token) {
+ params.token = this.service.options.token;
+ }
+
+ if (this.options.renderingRule) {
+ params.renderingRule = JSON.stringify(this.options.renderingRule);
+ }
+
+ if (this.options.mosaicRule) {
+ params.mosaicRule = JSON.stringify(this.options.mosaicRule);
+ }
+
+ return params;
+ },
+
+ _requestExport: function (params, bounds) {
+ if (this.options.f === 'json') {
+ this.service.request('exportImage', params, function (error, response) {
+ if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire
+ this._renderImage(response.href, bounds);
+ }, this);
+ } else {
+ params.f = 'image';
+ this._renderImage(this.options.url + 'exportImage' + L.Util.getParamString(params), bounds);
+ }
+ }
+ });
+
+ function imageMapLayer (url, options) {
+ return new ImageMapLayer(url, options);
+ }
+
+ var DynamicMapLayer = RasterLayer.extend({
+
+ options: {
+ updateInterval: 150,
+ layers: false,
+ layerDefs: false,
+ timeOptions: false,
+ format: 'png24',
+ transparent: true,
+ f: 'json'
+ },
+
+ initialize: function (options) {
+ options.url = cleanUrl(options.url);
+ this.service = mapService(options);
+ this.service.addEventParent(this);
+
+ if ((options.proxy || options.token) && options.f !== 'json') {
+ options.f = 'json';
+ }
+ L.Util.setOptions(this, options);
+ },
+
+ getDynamicLayers: function () {
+ return this.options.dynamicLayers;
+ },
+
+ setDynamicLayers: function (dynamicLayers) {
+ this.options.dynamicLayers = dynamicLayers;
+ this._update();
+ return this;
+ },
+
+ getLayers: function () {
+ return this.options.layers;
+ },
+
+ setLayers: function (layers) {
+ this.options.layers = layers;
+ this._update();
+ return this;
+ },
+
+ getLayerDefs: function () {
+ return this.options.layerDefs;
+ },
+
+ setLayerDefs: function (layerDefs) {
+ this.options.layerDefs = layerDefs;
+ this._update();
+ return this;
+ },
+
+ getTimeOptions: function () {
+ return this.options.timeOptions;
+ },
+
+ setTimeOptions: function (timeOptions) {
+ this.options.timeOptions = timeOptions;
+ this._update();
+ return this;
+ },
+
+ query: function () {
+ return this.service.query();
+ },
+
+ identify: function () {
+ return this.service.identify();
+ },
+
+ find: function () {
+ return this.service.find();
+ },
+
+ _getPopupData: function (e) {
+ var callback = L.Util.bind(function (error, featureCollection, response) {
+ if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire
+ setTimeout(L.Util.bind(function () {
+ this._renderPopup(e.latlng, error, featureCollection, response);
+ }, this), 300);
+ }, this);
+
+ var identifyRequest = this.identify().on(this._map).at(e.latlng);
+
+ if (this.options.layers) {
+ identifyRequest.layers('visible:' + this.options.layers.join(','));
+ } else {
+ identifyRequest.layers('visible');
+ }
+
+ identifyRequest.run(callback);
+
+ // set the flags to show the popup
+ this._shouldRenderPopup = true;
+ this._lastClick = e.latlng;
+ },
+
+ _buildExportParams: function () {
+ var bounds = this._map.getBounds();
+ var size = this._map.getSize();
+ var ne = this._map.options.crs.project(bounds.getNorthEast());
+ var sw = this._map.options.crs.project(bounds.getSouthWest());
+ var sr = parseInt(this._map.options.crs.code.split(':')[1], 10);
+
+ // ensure that we don't ask ArcGIS Server for a taller image than we have actual map displaying
+ var top = this._map.latLngToLayerPoint(bounds._northEast);
+ var bottom = this._map.latLngToLayerPoint(bounds._southWest);
+
+ if (top.y > 0 || bottom.y < size.y) {
+ size.y = bottom.y - top.y;
+ }
+
+ var params = {
+ bbox: [sw.x, sw.y, ne.x, ne.y].join(','),
+ size: size.x + ',' + size.y,
+ dpi: 96,
+ format: this.options.format,
+ transparent: this.options.transparent,
+ bboxSR: sr,
+ imageSR: sr
+ };
+
+ if (this.options.dynamicLayers) {
+ params.dynamicLayers = this.options.dynamicLayers;
+ }
+
+ if (this.options.layers) {
+ params.layers = 'show:' + this.options.layers.join(',');
+ }
+
+ if (this.options.layerDefs) {
+ params.layerDefs = JSON.stringify(this.options.layerDefs);
+ }
+
+ if (this.options.timeOptions) {
+ params.timeOptions = JSON.stringify(this.options.timeOptions);
+ }
+
+ if (this.options.from && this.options.to) {
+ params.time = this.options.from.valueOf() + ',' + this.options.to.valueOf();
+ }
+
+ if (this.service.options.token) {
+ params.token = this.service.options.token;
+ }
+
+ return params;
+ },
+
+ _requestExport: function (params, bounds) {
+ if (this.options.f === 'json') {
+ this.service.request('export', params, function (error, response) {
+ if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire
+ this._renderImage(response.href, bounds);
+ }, this);
+ } else {
+ params.f = 'image';
+ this._renderImage(this.options.url + 'export' + L.Util.getParamString(params), bounds);
+ }
+ }
+ });
+
+ function dynamicMapLayer (url, options) {
+ return new DynamicMapLayer(url, options);
+ }
+
+ var VirtualGrid = L.Layer.extend({
+
+ options: {
+ cellSize: 512,
+ updateInterval: 150
+ },
+
+ initialize: function (options) {
+ options = L.setOptions(this, options);
+ this._ok = true;
+ },
+
+ onAdd: function (map) {
+ this._map = map;
+ this._update = L.Util.throttle(this._update, this.options.updateInterval, this);
+ this._reset();
+ this._update();
+ },
+
+ onRemove: function () {
+ this._map.removeEventListener(this.getEvents(), this);
+ this._removeCells();
+ },
+
+ getEvents: function () {
+ var events = {
+ moveend: this._update,
+ movestart: this._start,
+ zoomend: this._reset
+ };
+
+ return events;
+ },
+
+ addTo: function (map) {
+ map.addLayer(this);
+ return this;
+ },
+
+ removeFrom: function (map) {
+ map.removeLayer(this);
+ return this;
+ },
+
+ _start: function () {
+ this._ok = true;
+ },
+
+ _reset: function () {
+ if (!this._ok) {
+ return;
+ }
+
+ this._removeCells();
+
+ this._cells = {};
+ this._activeCells = {};
+ this._cellsToLoad = 0;
+ this._cellsTotal = 0;
+ this._cellNumBounds = this._getCellNumBounds();
+
+ this._resetWrap();
+ this._zooming = false;
+ },
+
+ _resetWrap: function () {
+ var map = this._map;
+ var crs = map.options.crs;
+
+ if (crs.infinite) { return; }
+
+ var cellSize = this._getCellSize();
+
+ if (crs.wrapLng) {
+ this._wrapLng = [
+ Math.floor(map.project([0, crs.wrapLng[0]]).x / cellSize),
+ Math.ceil(map.project([0, crs.wrapLng[1]]).x / cellSize)
+ ];
+ }
+
+ if (crs.wrapLat) {
+ this._wrapLat = [
+ Math.floor(map.project([crs.wrapLat[0], 0]).y / cellSize),
+ Math.ceil(map.project([crs.wrapLat[1], 0]).y / cellSize)
+ ];
+ }
+ },
+
+ _getCellSize: function () {
+ return this.options.cellSize;
+ },
+
+ _update: function () {
+ if (!this._ok) {
+ return;
+ }
+
+ if (!this._map) {
+ return;
+ }
+
+ var bounds = this._map.getPixelBounds();
+ var cellSize = this._getCellSize();
+
+ // cell coordinates range for the current view
+ var cellBounds = L.bounds(
+ bounds.min.divideBy(cellSize).floor(),
+ bounds.max.divideBy(cellSize).floor());
+
+ this._removeOtherCells(cellBounds);
+ this._addCells(cellBounds);
+
+ this.fire('cellsupdated');
+
+ this._ok = false;
+ },
+
+ _addCells: function (bounds) {
+ var queue = [];
+ var center = bounds.getCenter();
+ var zoom = this._map.getZoom();
+
+ var j, i, coords;
+ // create a queue of coordinates to load cells from
+ for (j = bounds.min.y; j <= bounds.max.y; j++) {
+ for (i = bounds.min.x; i <= bounds.max.x; i++) {
+ coords = L.point(i, j);
+ coords.z = zoom;
+
+ if (this._isValidCell(coords)) {
+ queue.push(coords);
+ }
+ }
+ }
+
+ var cellsToLoad = queue.length;
+
+ if (cellsToLoad === 0) { return; }
+
+ this._cellsToLoad += cellsToLoad;
+ this._cellsTotal += cellsToLoad;
+
+ // sort cell queue to load cells in order of their distance to center
+ queue.sort(function (a, b) {
+ return a.distanceTo(center) - b.distanceTo(center);
+ });
+
+ for (i = 0; i < cellsToLoad; i++) {
+ this._addCell(queue[i]);
+ }
+ },
+
+ _isValidCell: function (coords) {
+ var crs = this._map.options.crs;
+
+ if (!crs.infinite) {
+ // don't load cell if it's out of bounds and not wrapped
+ var bounds = this._cellNumBounds;
+ if (
+ (!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||
+ (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))
+ ) {
+ return false;
+ }
+ }
+
+ if (!this.options.bounds) {
+ return true;
+ }
+
+ // don't load cell if it doesn't intersect the bounds in options
+ var cellBounds = this._cellCoordsToBounds(coords);
+ return L.latLngBounds(this.options.bounds).intersects(cellBounds);
+ },
+
+ // converts cell coordinates to its geographical bounds
+ _cellCoordsToBounds: function (coords) {
+ var map = this._map;
+ var cellSize = this.options.cellSize;
+ var nwPoint = coords.multiplyBy(cellSize);
+ var sePoint = nwPoint.add([cellSize, cellSize]);
+ var nw = map.wrapLatLng(map.unproject(nwPoint, coords.z));
+ var se = map.wrapLatLng(map.unproject(sePoint, coords.z));
+
+ return L.latLngBounds(nw, se);
+ },
+
+ // converts cell coordinates to key for the cell cache
+ _cellCoordsToKey: function (coords) {
+ return coords.x + ':' + coords.y;
+ },
+
+ // converts cell cache key to coordiantes
+ _keyToCellCoords: function (key) {
+ var kArr = key.split(':');
+ var x = parseInt(kArr[0], 10);
+ var y = parseInt(kArr[1], 10);
+
+ return L.point(x, y);
+ },
+
+ // remove any present cells that are off the specified bounds
+ _removeOtherCells: function (bounds) {
+ for (var key in this._cells) {
+ if (!bounds.contains(this._keyToCellCoords(key))) {
+ this._removeCell(key);
+ }
+ }
+ },
+
+ _removeCell: function (key) {
+ var cell = this._activeCells[key];
+
+ if (cell) {
+ delete this._activeCells[key];
+
+ if (this.cellLeave) {
+ this.cellLeave(cell.bounds, cell.coords);
+ }
+
+ this.fire('cellleave', {
+ bounds: cell.bounds,
+ coords: cell.coords
+ });
+ }
+ },
+
+ _removeCells: function () {
+ for (var key in this._cells) {
+ var bounds = this._cells[key].bounds;
+ var coords = this._cells[key].coords;
+
+ if (this.cellLeave) {
+ this.cellLeave(bounds, coords);
+ }
+
+ this.fire('cellleave', {
+ bounds: bounds,
+ coords: coords
+ });
+ }
+ },
+
+ _addCell: function (coords) {
+ // wrap cell coords if necessary (depending on CRS)
+ this._wrapCoords(coords);
+
+ // generate the cell key
+ var key = this._cellCoordsToKey(coords);
+
+ // get the cell from the cache
+ var cell = this._cells[key];
+ // if this cell should be shown as isnt active yet (enter)
+
+ if (cell && !this._activeCells[key]) {
+ if (this.cellEnter) {
+ this.cellEnter(cell.bounds, coords);
+ }
+
+ this.fire('cellenter', {
+ bounds: cell.bounds,
+ coords: coords
+ });
+
+ this._activeCells[key] = cell;
+ }
+
+ // if we dont have this cell in the cache yet (create)
+ if (!cell) {
+ cell = {
+ coords: coords,
+ bounds: this._cellCoordsToBounds(coords)
+ };
+
+ this._cells[key] = cell;
+ this._activeCells[key] = cell;
+
+ if (this.createCell) {
+ this.createCell(cell.bounds, coords);
+ }
+
+ this.fire('cellcreate', {
+ bounds: cell.bounds,
+ coords: coords
+ });
+ }
+ },
+
+ _wrapCoords: function (coords) {
+ coords.x = this._wrapLng ? L.Util.wrapNum(coords.x, this._wrapLng) : coords.x;
+ coords.y = this._wrapLat ? L.Util.wrapNum(coords.y, this._wrapLat) : coords.y;
+ },
+
+ // get the global cell coordinates range for the current zoom
+ _getCellNumBounds: function () {
+ var bounds = this._map.getPixelWorldBounds();
+ var size = this._getCellSize();
+
+ return bounds ? L.bounds(
+ bounds.min.divideBy(size).floor(),
+ bounds.max.divideBy(size).ceil().subtract([1, 1])) : null;
+ }
+ });
+
+ function BinarySearchIndex (values) {
+ this.values = [].concat(values || []);
+ }
+
+ BinarySearchIndex.prototype.query = function (value) {
+ var index = this.getIndex(value);
+ return this.values[index];
+ };
+
+ BinarySearchIndex.prototype.getIndex = function getIndex (value) {
+ if (this.dirty) {
+ this.sort();
+ }
+
+ var minIndex = 0;
+ var maxIndex = this.values.length - 1;
+ var currentIndex;
+ var currentElement;
+
+ while (minIndex <= maxIndex) {
+ currentIndex = (minIndex + maxIndex) / 2 | 0;
+ currentElement = this.values[Math.round(currentIndex)];
+ if (+currentElement.value < +value) {
+ minIndex = currentIndex + 1;
+ } else if (+currentElement.value > +value) {
+ maxIndex = currentIndex - 1;
+ } else {
+ return currentIndex;
+ }
+ }
+
+ return Math.abs(~maxIndex);
+ };
+
+ BinarySearchIndex.prototype.between = function between (start, end) {
+ var startIndex = this.getIndex(start);
+ var endIndex = this.getIndex(end);
+
+ if (startIndex === 0 && endIndex === 0) {
+ return [];
+ }
+
+ while (this.values[startIndex - 1] && this.values[startIndex - 1].value === start) {
+ startIndex--;
+ }
+
+ while (this.values[endIndex + 1] && this.values[endIndex + 1].value === end) {
+ endIndex++;
+ }
+
+ if (this.values[endIndex] && this.values[endIndex].value === end && this.values[endIndex + 1]) {
+ endIndex++;
+ }
+
+ return this.values.slice(startIndex, endIndex);
+ };
+
+ BinarySearchIndex.prototype.insert = function insert (item) {
+ this.values.splice(this.getIndex(item.value), 0, item);
+ return this;
+ };
+
+ BinarySearchIndex.prototype.bulkAdd = function bulkAdd (items, sort) {
+ this.values = this.values.concat([].concat(items || []));
+
+ if (sort) {
+ this.sort();
+ } else {
+ this.dirty = true;
+ }
+
+ return this;
+ };
+
+ BinarySearchIndex.prototype.sort = function sort () {
+ this.values.sort(function (a, b) {
+ return +b.value - +a.value;
+ }).reverse();
+ this.dirty = false;
+ return this;
+ };
+
+ var FeatureManager = VirtualGrid.extend({
+ /**
+ * Options
+ */
+
+ options: {
+ attribution: null,
+ where: '1=1',
+ fields: ['*'],
+ from: false,
+ to: false,
+ timeField: false,
+ timeFilterMode: 'server',
+ simplifyFactor: 0,
+ precision: 6
+ },
+
+ /**
+ * Constructor
+ */
+
+ initialize: function (options) {
+ VirtualGrid.prototype.initialize.call(this, options);
+
+ options.url = cleanUrl(options.url);
+ options = L.setOptions(this, options);
+
+ this.service = featureLayerService(options);
+ this.service.addEventParent(this);
+
+ // use case insensitive regex to look for common fieldnames used for indexing
+ if (this.options.fields[0] !== '*') {
+ var oidCheck = false;
+ for (var i = 0; i < this.options.fields.length; i++) {
+ if (this.options.fields[i].match(/^(OBJECTID|FID|OID|ID)$/i)) {
+ oidCheck = true;
+ }
+ }
+ if (oidCheck === false) {
+ warn('no known esriFieldTypeOID field detected in fields Array. Please add an attribute field containing unique IDs to ensure the layer can be drawn correctly.');
+ }
+ }
+
+ if (this.options.timeField.start && this.options.timeField.end) {
+ this._startTimeIndex = new BinarySearchIndex();
+ this._endTimeIndex = new BinarySearchIndex();
+ } else if (this.options.timeField) {
+ this._timeIndex = new BinarySearchIndex();
+ }
+
+ this._cache = {};
+ this._currentSnapshot = []; // cache of what layers should be active
+ this._activeRequests = 0;
+ },
+
+ /**
+ * Layer Interface
+ */
+
+ onAdd: function (map) {
+ map.on('zoomend', this._handleZoomChange, this);
+
+ return VirtualGrid.prototype.onAdd.call(this, map);
+ },
+
+ onRemove: function (map) {
+ map.off('zoomend', this._handleZoomChange, this);
+
+ return VirtualGrid.prototype.onRemove.call(this, map);
+ },
+
+ getAttribution: function () {
+ return this.options.attribution;
+ },
+
+ /**
+ * Feature Management
+ */
+
+ createCell: function (bounds, coords) {
+ this._requestFeatures(bounds, coords);
+ },
+
+ _requestFeatures: function (bounds, coords, callback) {
+ this._activeRequests++;
+
+ // our first active request fires loading
+ if (this._activeRequests === 1) {
+ this.fire('loading', {
+ bounds: bounds
+ }, true);
+ }
+
+ return this._buildQuery(bounds).run(function (error, featureCollection, response) {
+ if (response && response.exceededTransferLimit) {
+ this.fire('drawlimitexceeded');
+ }
+
+ // no error, features
+ if (!error && featureCollection && featureCollection.features.length) {
+ // schedule adding features until the next animation frame
+ L.Util.requestAnimFrame(L.Util.bind(function () {
+ this._addFeatures(featureCollection.features, coords);
+ this._postProcessFeatures(bounds);
+ }, this));
+ }
+
+ // no error, no features
+ if (!error && featureCollection && !featureCollection.features.length) {
+ this._postProcessFeatures(bounds);
+ }
+
+ if (error) {
+ this._postProcessFeatures(bounds);
+ }
+
+ if (callback) {
+ callback.call(this, error, featureCollection);
+ }
+ }, this);
+ },
+
+ _postProcessFeatures: function (bounds) {
+ // deincriment the request counter now that we have processed features
+ this._activeRequests--;
+
+ // if there are no more active requests fire a load event for this view
+ if (this._activeRequests <= 0) {
+ this.fire('load', {
+ bounds: bounds
+ });
+ }
+ },
+
+ _cacheKey: function (coords) {
+ return coords.z + ':' + coords.x + ':' + coords.y;
+ },
+
+ _addFeatures: function (features, coords) {
+ var key = this._cacheKey(coords);
+ this._cache[key] = this._cache[key] || [];
+
+ for (var i = features.length - 1; i >= 0; i--) {
+ var id = features[i].id;
+ this._currentSnapshot.push(id);
+ this._cache[key].push(id);
+ }
+
+ if (this.options.timeField) {
+ this._buildTimeIndexes(features);
+ }
+
+ // need to PR removal of the logic below too...
+ // https://github.com/patrickarlt/leaflet-virtual-grid/blob/master/src/virtual-grid.js#L100-L102
+
+ this.createLayers(features);
+ },
+
+ _buildQuery: function (bounds) {
+ var query = this.service.query()
+ .intersects(bounds)
+ .where(this.options.where)
+ .fields(this.options.fields)
+ .precision(this.options.precision);
+
+ if (this.options.simplifyFactor) {
+ query.simplify(this._map, this.options.simplifyFactor);
+ }
+
+ if (this.options.timeFilterMode === 'server' && this.options.from && this.options.to) {
+ query.between(this.options.from, this.options.to);
+ }
+
+ return query;
+ },
+
+ /**
+ * Where Methods
+ */
+
+ setWhere: function (where, callback, context) {
+ this.options.where = (where && where.length) ? where : '1=1';
+
+ var oldSnapshot = [];
+ var newSnapshot = [];
+ var pendingRequests = 0;
+ var requestError = null;
+ var requestCallback = L.Util.bind(function (error, featureCollection) {
+ if (error) {
+ requestError = error;
+ }
+
+ if (featureCollection) {
+ for (var i = featureCollection.features.length - 1; i >= 0; i--) {
+ newSnapshot.push(featureCollection.features[i].id);
+ }
+ }
+
+ pendingRequests--;
+
+ if (pendingRequests <= 0) {
+ this._currentSnapshot = newSnapshot;
+ // schedule adding features for the next animation frame
+ L.Util.requestAnimFrame(L.Util.bind(function () {
+ this.removeLayers(oldSnapshot);
+ this.addLayers(newSnapshot);
+ if (callback) {
+ callback.call(context, requestError);
+ }
+ }, this));
+ }
+ }, this);
+
+ for (var i = this._currentSnapshot.length - 1; i >= 0; i--) {
+ oldSnapshot.push(this._currentSnapshot[i]);
+ }
+
+ for (var key in this._activeCells) {
+ pendingRequests++;
+ var coords = this._keyToCellCoords(key);
+ var bounds = this._cellCoordsToBounds(coords);
+ this._requestFeatures(bounds, key, requestCallback);
+ }
+
+ return this;
+ },
+
+ getWhere: function () {
+ return this.options.where;
+ },
+
+ /**
+ * Time Range Methods
+ */
+
+ getTimeRange: function () {
+ return [this.options.from, this.options.to];
+ },
+
+ setTimeRange: function (from, to, callback, context) {
+ var oldFrom = this.options.from;
+ var oldTo = this.options.to;
+ var pendingRequests = 0;
+ var requestError = null;
+ var requestCallback = L.Util.bind(function (error) {
+ if (error) {
+ requestError = error;
+ }
+ this._filterExistingFeatures(oldFrom, oldTo, from, to);
+
+ pendingRequests--;
+
+ if (callback && pendingRequests <= 0) {
+ callback.call(context, requestError);
+ }
+ }, this);
+
+ this.options.from = from;
+ this.options.to = to;
+
+ this._filterExistingFeatures(oldFrom, oldTo, from, to);
+
+ if (this.options.timeFilterMode === 'server') {
+ for (var key in this._activeCells) {
+ pendingRequests++;
+ var coords = this._keyToCellCoords(key);
+ var bounds = this._cellCoordsToBounds(coords);
+ this._requestFeatures(bounds, key, requestCallback);
+ }
+ }
+
+ return this;
+ },
+
+ refresh: function () {
+ for (var key in this._activeCells) {
+ var coords = this._keyToCellCoords(key);
+ var bounds = this._cellCoordsToBounds(coords);
+ this._requestFeatures(bounds, key);
+ }
+
+ if (this.redraw) {
+ this.once('load', function () {
+ this.eachFeature(function (layer) {
+ this._redraw(layer.feature.id);
+ }, this);
+ }, this);
+ }
+ },
+
+ _filterExistingFeatures: function (oldFrom, oldTo, newFrom, newTo) {
+ var layersToRemove = (oldFrom && oldTo) ? this._getFeaturesInTimeRange(oldFrom, oldTo) : this._currentSnapshot;
+ var layersToAdd = this._getFeaturesInTimeRange(newFrom, newTo);
+
+ if (layersToAdd.indexOf) {
+ for (var i = 0; i < layersToAdd.length; i++) {
+ var shouldRemoveLayer = layersToRemove.indexOf(layersToAdd[i]);
+ if (shouldRemoveLayer >= 0) {
+ layersToRemove.splice(shouldRemoveLayer, 1);
+ }
+ }
+ }
+
+ // schedule adding features until the next animation frame
+ L.Util.requestAnimFrame(L.Util.bind(function () {
+ this.removeLayers(layersToRemove);
+ this.addLayers(layersToAdd);
+ }, this));
+ },
+
+ _getFeaturesInTimeRange: function (start, end) {
+ var ids = [];
+ var search;
+
+ if (this.options.timeField.start && this.options.timeField.end) {
+ var startTimes = this._startTimeIndex.between(start, end);
+ var endTimes = this._endTimeIndex.between(start, end);
+ search = startTimes.concat(endTimes);
+ } else {
+ search = this._timeIndex.between(start, end);
+ }
+
+ for (var i = search.length - 1; i >= 0; i--) {
+ ids.push(search[i].id);
+ }
+
+ return ids;
+ },
+
+ _buildTimeIndexes: function (geojson) {
+ var i;
+ var feature;
+ if (this.options.timeField.start && this.options.timeField.end) {
+ var startTimeEntries = [];
+ var endTimeEntries = [];
+ for (i = geojson.length - 1; i >= 0; i--) {
+ feature = geojson[i];
+ startTimeEntries.push({
+ id: feature.id,
+ value: new Date(feature.properties[this.options.timeField.start])
+ });
+ endTimeEntries.push({
+ id: feature.id,
+ value: new Date(feature.properties[this.options.timeField.end])
+ });
+ }
+ this._startTimeIndex.bulkAdd(startTimeEntries);
+ this._endTimeIndex.bulkAdd(endTimeEntries);
+ } else {
+ var timeEntries = [];
+ for (i = geojson.length - 1; i >= 0; i--) {
+ feature = geojson[i];
+ timeEntries.push({
+ id: feature.id,
+ value: new Date(feature.properties[this.options.timeField])
+ });
+ }
+
+ this._timeIndex.bulkAdd(timeEntries);
+ }
+ },
+
+ _featureWithinTimeRange: function (feature) {
+ if (!this.options.from || !this.options.to) {
+ return true;
+ }
+
+ var from = +this.options.from.valueOf();
+ var to = +this.options.to.valueOf();
+
+ if (typeof this.options.timeField === 'string') {
+ var date = +feature.properties[this.options.timeField];
+ return (date >= from) && (date <= to);
+ }
+
+ if (this.options.timeField.start && this.options.timeField.end) {
+ var startDate = +feature.properties[this.options.timeField.start];
+ var endDate = +feature.properties[this.options.timeField.end];
+ return ((startDate >= from) && (startDate <= to)) || ((endDate >= from) && (endDate <= to));
+ }
+ },
+
+ _visibleZoom: function () {
+ // check to see whether the current zoom level of the map is within the optional limit defined for the FeatureLayer
+ if (!this._map) {
+ return false;
+ }
+ var zoom = this._map.getZoom();
+ if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {
+ return false;
+ } else { return true; }
+ },
+
+ _handleZoomChange: function () {
+ if (!this._visibleZoom()) {
+ this.removeLayers(this._currentSnapshot);
+ this._currentSnapshot = [];
+ } else {
+ /*
+ for every cell in this._activeCells
+ 1. Get the cache key for the coords of the cell
+ 2. If this._cache[key] exists it will be an array of feature IDs.
+ 3. Call this.addLayers(this._cache[key]) to instruct the feature layer to add the layers back.
+ */
+ for (var i in this._activeCells) {
+ var coords = this._activeCells[i].coords;
+ var key = this._cacheKey(coords);
+ if (this._cache[key]) {
+ this.addLayers(this._cache[key]);
+ }
+ }
+ }
+ },
+
+ /**
+ * Service Methods
+ */
+
+ authenticate: function (token) {
+ this.service.authenticate(token);
+ return this;
+ },
+
+ metadata: function (callback, context) {
+ this.service.metadata(callback, context);
+ return this;
+ },
+
+ query: function () {
+ return this.service.query();
+ },
+
+ _getMetadata: function (callback) {
+ if (this._metadata) {
+ var error;
+ callback(error, this._metadata);
+ } else {
+ this.metadata(L.Util.bind(function (error, response) {
+ this._metadata = response;
+ callback(error, this._metadata);
+ }, this));
+ }
+ },
+
+ addFeature: function (feature, callback, context) {
+ this._getMetadata(L.Util.bind(function (error, metadata) {
+ if (error) {
+ if (callback) { callback.call(this, error, null); }
+ return;
+ }
+
+ this.service.addFeature(feature, L.Util.bind(function (error, response) {
+ if (!error) {
+ // assign ID from result to appropriate objectid field from service metadata
+ feature.properties[metadata.objectIdField] = response.objectId;
+
+ // we also need to update the geojson id for createLayers() to function
+ feature.id = response.objectId;
+ this.createLayers([feature]);
+ }
+
+ if (callback) {
+ callback.call(context, error, response);
+ }
+ }, this));
+ }, this));
+ },
+
+ updateFeature: function (feature, callback, context) {
+ this.service.updateFeature(feature, function (error, response) {
+ if (!error) {
+ this.removeLayers([feature.id], true);
+ this.createLayers([feature]);
+ }
+
+ if (callback) {
+ callback.call(context, error, response);
+ }
+ }, this);
+ },
+
+ deleteFeature: function (id, callback, context) {
+ this.service.deleteFeature(id, function (error, response) {
+ if (!error && response.objectId) {
+ this.removeLayers([response.objectId], true);
+ }
+ if (callback) {
+ callback.call(context, error, response);
+ }
+ }, this);
+ },
+
+ deleteFeatures: function (ids, callback, context) {
+ return this.service.deleteFeatures(ids, function (error, response) {
+ if (!error && response.length > 0) {
+ for (var i = 0; i < response.length; i++) {
+ this.removeLayers([response[i].objectId], true);
+ }
+ }
+ if (callback) {
+ callback.call(context, error, response);
+ }
+ }, this);
+ }
+ });
+
+ var FeatureLayer = FeatureManager.extend({
+
+ options: {
+ cacheLayers: true
+ },
+
+ /**
+ * Constructor
+ */
+ initialize: function (options) {
+ FeatureManager.prototype.initialize.call(this, options);
+ this._originalStyle = this.options.style;
+ this._layers = {};
+ },
+
+ /**
+ * Layer Interface
+ */
+
+ onRemove: function (map) {
+ for (var i in this._layers) {
+ map.removeLayer(this._layers[i]);
+ }
+
+ return FeatureManager.prototype.onRemove.call(this, map);
+ },
+
+ createNewLayer: function (geojson) {
+ var layer = L.GeoJSON.geometryToLayer(geojson, this.options);
+ layer.defaultOptions = layer.options;
+ return layer;
+ },
+
+ _updateLayer: function (layer, geojson) {
+ // convert the geojson coordinates into a Leaflet LatLng array/nested arrays
+ // pass it to setLatLngs to update layer geometries
+ var latlngs = [];
+ var coordsToLatLng = this.options.coordsToLatLng || L.GeoJSON.coordsToLatLng;
+
+ // copy new attributes, if present
+ if (geojson.properties) {
+ layer.feature.properties = geojson.properties;
+ }
+
+ switch (geojson.geometry.type) {
+ case 'Point':
+ latlngs = L.GeoJSON.coordsToLatLng(geojson.geometry.coordinates);
+ layer.setLatLng(latlngs);
+ break;
+ case 'LineString':
+ latlngs = L.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 0, coordsToLatLng);
+ layer.setLatLngs(latlngs);
+ break;
+ case 'MultiLineString':
+ latlngs = L.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng);
+ layer.setLatLngs(latlngs);
+ break;
+ case 'Polygon':
+ latlngs = L.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng);
+ layer.setLatLngs(latlngs);
+ break;
+ case 'MultiPolygon':
+ latlngs = L.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 2, coordsToLatLng);
+ layer.setLatLngs(latlngs);
+ break;
+ }
+ },
+
+ /**
+ * Feature Management Methods
+ */
+
+ createLayers: function (features) {
+ for (var i = features.length - 1; i >= 0; i--) {
+ var geojson = features[i];
+
+ var layer = this._layers[geojson.id];
+ var newLayer;
+
+ if (this._visibleZoom() && layer && !this._map.hasLayer(layer)) {
+ this._map.addLayer(layer);
+ }
+
+ // update geometry if necessary
+ if (layer && this.options.simplifyFactor > 0 && (layer.setLatLngs || layer.setLatLng)) {
+ this._updateLayer(layer, geojson);
+ }
+
+ if (!layer) {
+ newLayer = this.createNewLayer(geojson);
+ newLayer.feature = geojson;
+
+ // bubble events from individual layers to the feature layer
+ newLayer.addEventParent(this);
+
+ if (this.options.onEachFeature) {
+ this.options.onEachFeature(newLayer.feature, newLayer);
+ }
+
+ // cache the layer
+ this._layers[newLayer.feature.id] = newLayer;
+
+ // style the layer
+ this.setFeatureStyle(newLayer.feature.id, this.options.style);
+
+ this.fire('createfeature', {
+ feature: newLayer.feature
+ }, true);
+
+ // add the layer if the current zoom level is inside the range defined for the layer, it is within the current time bounds or our layer is not time enabled
+ if (this._visibleZoom() && (!this.options.timeField || (this.options.timeField && this._featureWithinTimeRange(geojson)))) {
+ this._map.addLayer(newLayer);
+ }
+ }
+ }
+ },
+
+ addLayers: function (ids) {
+ for (var i = ids.length - 1; i >= 0; i--) {
+ var layer = this._layers[ids[i]];
+ if (layer) {
+ this.fire('addfeature', {
+ feature: layer.feature
+ }, true);
+ this._map.addLayer(layer);
+ }
+ }
+ },
+
+ removeLayers: function (ids, permanent) {
+ for (var i = ids.length - 1; i >= 0; i--) {
+ var id = ids[i];
+ var layer = this._layers[id];
+ if (layer) {
+ this.fire('removefeature', {
+ feature: layer.feature,
+ permanent: permanent
+ }, true);
+ this._map.removeLayer(layer);
+ }
+ if (layer && permanent) {
+ delete this._layers[id];
+ }
+ }
+ },
+
+ cellEnter: function (bounds, coords) {
+ if (!this._zooming && this._map) {
+ L.Util.requestAnimFrame(L.Util.bind(function () {
+ var cacheKey = this._cacheKey(coords);
+ var cellKey = this._cellCoordsToKey(coords);
+ var layers = this._cache[cacheKey];
+ if (this._activeCells[cellKey] && layers) {
+ this.addLayers(layers);
+ }
+ }, this));
+ }
+ },
+
+ cellLeave: function (bounds, coords) {
+ if (!this._zooming) {
+ L.Util.requestAnimFrame(L.Util.bind(function () {
+ if (this._map) {
+ var cacheKey = this._cacheKey(coords);
+ var cellKey = this._cellCoordsToKey(coords);
+ var layers = this._cache[cacheKey];
+ var mapBounds = this._map.getBounds();
+ if (!this._activeCells[cellKey] && layers) {
+ var removable = true;
+
+ for (var i = 0; i < layers.length; i++) {
+ var layer = this._layers[layers[i]];
+ if (layer && layer.getBounds && mapBounds.intersects(layer.getBounds())) {
+ removable = false;
+ }
+ }
+
+ if (removable) {
+ this.removeLayers(layers, !this.options.cacheLayers);
+ }
+
+ if (!this.options.cacheLayers && removable) {
+ delete this._cache[cacheKey];
+ delete this._cells[cellKey];
+ delete this._activeCells[cellKey];
+ }
+ }
+ }
+ }, this));
+ }
+ },
+
+ /**
+ * Styling Methods
+ */
+
+ resetStyle: function () {
+ this.options.style = this._originalStyle;
+ this.eachFeature(function (layer) {
+ this.resetFeatureStyle(layer.feature.id);
+ }, this);
+ return this;
+ },
+
+ setStyle: function (style) {
+ this.options.style = style;
+ this.eachFeature(function (layer) {
+ this.setFeatureStyle(layer.feature.id, style);
+ }, this);
+ return this;
+ },
+
+ resetFeatureStyle: function (id) {
+ var layer = this._layers[id];
+ var style = this._originalStyle || L.Path.prototype.options;
+ if (layer) {
+ L.Util.extend(layer.options, layer.defaultOptions);
+ this.setFeatureStyle(id, style);
+ }
+ return this;
+ },
+
+ setFeatureStyle: function (id, style) {
+ var layer = this._layers[id];
+ if (typeof style === 'function') {
+ style = style(layer.feature);
+ }
+ if (layer.setStyle) {
+ layer.setStyle(style);
+ }
+ return this;
+ },
+
+ /**
+ * Utility Methods
+ */
+
+ eachFeature: function (fn, context) {
+ for (var i in this._layers) {
+ fn.call(context, this._layers[i]);
+ }
+ return this;
+ },
+
+ getFeature: function (id) {
+ return this._layers[id];
+ },
+
+ bringToBack: function () {
+ this.eachFeature(function (layer) {
+ if (layer.bringToBack) {
+ layer.bringToBack();
+ }
+ });
+ },
+
+ bringToFront: function () {
+ this.eachFeature(function (layer) {
+ if (layer.bringToFront) {
+ layer.bringToFront();
+ }
+ });
+ },
+
+ redraw: function (id) {
+ if (id) {
+ this._redraw(id);
+ }
+ return this;
+ },
+
+ _redraw: function (id) {
+ var layer = this._layers[id];
+ var geojson = layer.feature;
+
+ // if this looks like a marker
+ if (layer && layer.setIcon && this.options.pointToLayer) {
+ // update custom symbology, if necessary
+ if (this.options.pointToLayer) {
+ var getIcon = this.options.pointToLayer(geojson, L.latLng(geojson.geometry.coordinates[1], geojson.geometry.coordinates[0]));
+ var updatedIcon = getIcon.options.icon;
+ layer.setIcon(updatedIcon);
+ }
+ }
+
+ // looks like a vector marker (circleMarker)
+ if (layer && layer.setStyle && this.options.pointToLayer) {
+ var getStyle = this.options.pointToLayer(geojson, L.latLng(geojson.geometry.coordinates[1], geojson.geometry.coordinates[0]));
+ var updatedStyle = getStyle.options;
+ this.setFeatureStyle(geojson.id, updatedStyle);
+ }
+
+ // looks like a path (polygon/polyline)
+ if (layer && layer.setStyle && this.options.style) {
+ this.resetStyle(geojson.id);
+ }
+ }
+ });
+
+ function featureLayer (options) {
+ return new FeatureLayer(options);
+ }
+
+ exports.VERSION = version;
+ exports.Support = Support;
+ exports.Util = Util;
+ exports.get = get;
+ exports.post = xmlHttpPost;
+ exports.request = request;
+ exports.Task = Task;
+ exports.task = task;
+ exports.Query = Query;
+ exports.query = query;
+ exports.Find = Find;
+ exports.find = find;
+ exports.Identify = Identify;
+ exports.identify = identify;
+ exports.IdentifyFeatures = IdentifyFeatures;
+ exports.identifyFeatures = identifyFeatures;
+ exports.IdentifyImage = IdentifyImage;
+ exports.identifyImage = identifyImage;
+ exports.Service = Service;
+ exports.service = service;
+ exports.MapService = MapService;
+ exports.mapService = mapService;
+ exports.ImageService = ImageService;
+ exports.imageService = imageService;
+ exports.FeatureLayerService = FeatureLayerService;
+ exports.featureLayerService = featureLayerService;
+ exports.BasemapLayer = BasemapLayer;
+ exports.basemapLayer = basemapLayer;
+ exports.TiledMapLayer = TiledMapLayer;
+ exports.tiledMapLayer = tiledMapLayer;
+ exports.RasterLayer = RasterLayer;
+ exports.ImageMapLayer = ImageMapLayer;
+ exports.imageMapLayer = imageMapLayer;
+ exports.DynamicMapLayer = DynamicMapLayer;
+ exports.dynamicMapLayer = dynamicMapLayer;
+ exports.FeatureManager = FeatureManager;
+ exports.FeatureLayer = FeatureLayer;
+ exports.featureLayer = featureLayer;
+
+}));
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNyaS1sZWFmbGV0LWRlYnVnLmpzIiwic291cmNlcyI6WyIuLi9wYWNrYWdlLmpzb24iLCIuLi9zcmMvU3VwcG9ydC5qcyIsIi4uL25vZGVfbW9kdWxlcy9hcmNnaXMtdG8tZ2VvanNvbi11dGlscy9pbmRleC5qcyIsIi4uL3NyYy9VdGlsLmpzIiwiLi4vc3JjL1JlcXVlc3QuanMiLCIuLi9zcmMvVGFza3MvVGFzay5qcyIsIi4uL3NyYy9UYXNrcy9RdWVyeS5qcyIsIi4uL3NyYy9U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VU0dTLCBOQVNBLCBFU0EsIE1FVEksIE5SQ0FOLCBHRUJDTywgTk9BQSwgaW5jcmVtZW50IFAgQ29ycC4nXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBEYXJrR3JheToge1xuICAgICAgICB1cmxUZW1wbGF0ZTogdGlsZVByb3RvY29sICsgJy8ve3N9LmFyY2dpc29ubGluZS5jb20vQXJjR0lTL3Jlc3Qvc2VydmljZXMvQ2FudmFzL1dvcmxkX0RhcmtfR3JheV9CYXNlL01hcFNlcnZlci90aWxlL3t6fS97eX0ve3h9JyxcbiAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgIGhpZGVMb2dvOiBmYWxzZSxcbiAgICAgICAgICBsb2dvUG9zaXRpb246ICdib3R0b21yaWdodCcsXG4gICAgICAgICAgbWluWm9vbTogMSxcbiAgICAgICAgICBtYXhab29tOiAxNixcbiAgICAgICAgICBzdWJkb21haW5zOiBbJ3NlcnZlcicsICdzZXJ2aWNlcyddLFxuICAgICAgICAgIGF0dHJpYnV0aW9uOiAnRXNyaSwgSEVSRSwgRGVMb3JtZSwgTWFwbXlJbmRpYSwgwqkgT3BlblN0cmVldE1hcCBjb250cmlidXRvcnMnXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBEYXJrR3JheUxhYmVsczoge1xuICAgICAgICB1cmxUZW1wbGF0ZTogdGlsZVByb3RvY29sICsgJy8ve3N9LmFyY2dpc29ubGluZS5jb20vQXJjR0lTL3Jlc3Qvc2VydmljZXMvQ2FudmFzL1dvcmxkX0RhcmtfR3JheV9SZWZlcmVuY2UvTWFwU2VydmVyL3RpbGUve3p9L3t5fS97eH0nLFxuICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgaGlkZUxvZ286IHRydWUsXG4gICAgICAgICAgbG9nb1Bvc2l0aW9uOiAnYm90dG9tcmlnaHQnLFxuICAgICAgICAgIG1pblpvb206IDEsXG4gICAgICAgICAgbWF4Wm9vbTogMTYsXG4gICAgICAgICAgc3Vi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xcbiAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgIGhpZGVMb2dvOiBmYWxzZSxcbiAgICAgICAgICBsb2dvUG9zaXRpb246ICdib3R0b21yaWdodCcsXG4gICAgICAgICAgbWluWm9vbTogMSxcbiAgICAgICAgICBtYXhab29tOiAxMyxcbiAgICAgICAgICBzdWJkb21haW5zOiBbJ3NlcnZlcicsICdzZXJ2aWNlcyddLFxuICAgICAgICAgIGF0dHJpYnV0aW9uOiAnRXNyaSwgVVNHUydcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFNoYWRlZFJlbGllZkxhYmVsczoge1xuICAgICAgICB1cmxUZW1wbGF0ZTogdGlsZVByb3RvY29sICsgJy8ve3N9LmFyY2dpc29ubGluZS5jb20vQXJjR0lTL3Jlc3Qvc2VydmljZXMvUmVmZXJlbmNlL1dvcmxkX0JvdW5kYXJpZXNfYW5kX1BsYWNlc19BbHRlcm5hdGUvTWFwU2VydmVyL3RpbGUve3p9L3t5fS97eH0nLFxuICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgaGlkZUxvZ286IHRydWUsXG4gICAgICAgICAgbG9nb1Bvc2l0aW9uOiAnYm90dG9tcmlnaHQnLFxuICAgICAgICAgIG1pblpvb206IDEsXG4gICAgICAgICAgbWF4Wm9vbTogMTIsXG4gICAgICAgICAgc3ViZG9tYWluczogWydzZXJ2ZXInLCAnc2VydmljZXMnXSxcbiAgICAgICAgICBwYW5lOiAocG9pbnRlckV2ZW50cykgPyAnZXNyaS1sYWJlbHMnIDogJ3RpbGVQYW5lJ1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgVGVycmFpbjoge1xuICAgICAgICB1cmxUZW1wbGF0ZTogdGlsZVByb3RvY29sICsgJy8ve3N9LmFyY2dpc29ubGluZS5jb20vQXJjR0lTL3Jlc3Qvc2VydmljZXMvV29ybGRfVGVycmFpbl9CYXNlL01hcFNlcnZlci90aWxlL3t6fS97eX0ve3h9JyxcbiAgICAgICAgb3B0aW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WxsTGVhdmU6IGZ1bmN0aW9uIChib3VuZHMsIGNvb3Jkcykge1xuICAgIGlmICghdGhpcy5fem9vbWluZykge1xuICAgICAgTC5VdGlsLnJlcXVlc3RBbmltRnJhbWUoTC5VdGlsLmJpbmQoZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcy5fbWFwKSB7XG4gICAgICAgICAgdmFyIGNhY2hlS2V5ID0gdGhpcy5fY2FjaGVLZXkoY29vcmRzKTtcbiAgICAgICAgICB2YXIgY2VsbEtleSA9IHRoaXMuX2NlbGxDb29yZHNUb0tleShjb29yZHMpO1xuICAgICAgICAgIHZhciBsYXllcnMgPSB0aGlzLl9jYWNoZVtjYWNoZUtleV07XG4gICAgICAgICAgdmFyIG1hcEJvdW5kcyA9IHRoaXMuX21hcC5nZXRCb3VuZHMoKTtcbiAgICAgICAgICBpZiAoIXRoaXMuX2FjdGl2ZUNlbGxzW2NlbGxLZXldICYmIGxheWVycykge1xuICAgICAgICAgICAgdmFyIHJlbW92YWJsZSA9IHRydWU7XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGF5ZXJzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgIHZhciBsYXllciA9IHRoaXMuX2xheWVyc1tsYXllcnNbaV1dO1xuICAgICAgICAgICAgICBpZiAobGF5ZXIgJiYgbGF5ZXIuZ2V0Qm91bmRzICYmIG1hcEJvdW5kcy5pbnRlcnNlY3RzKGxheWVyLmdldEJvdW5kcygpKSkge1xuICAgICAgICAgICAgICAgIHJlbW92YWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChyZW1vdmFibGUpIHtcbiAgICAgICAgICAgICAgdGhpcy5yZW1vdmVMYXllcnMobGF5ZXJzLCAhdGhpcy5vcHRpb25zLmNhY2hlTGF5ZXJzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCF0aGlzL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0FBQSxDQUFDOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
\ No newline at end of file
diff --git a/dist/esri-leaflet.js b/dist/esri-leaflet.js
new file mode 100644
index 000000000..6af7f8625
--- /dev/null
+++ b/dist/esri-leaflet.js
@@ -0,0 +1,3 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet"],e):e((t.L=t.L||{},t.L.esri=t.L.esri||{}),t.L)}(this,function(t,e){"use strict";function i(t,e){for(var i=0;is;s++)e=t[s+1],i+=(e[0]-o[0])*(e[1]+o[1]),o=e;return i>=0}function o(t,e,i,s){var r=(s[0]-i[0])*(t[1]-i[1])-(s[1]-i[1])*(t[0]-i[0]),o=(e[0]-t[0])*(t[1]-i[1])-(e[1]-t[1])*(t[0]-i[0]),n=(s[1]-i[1])*(e[0]-t[0])-(s[0]-i[0])*(e[1]-t[1]);if(0!==n){var a=r/n,l=o/n;if(a>=0&&1>=a&&l>=0&&1>=l)return!0}return!1}function n(t,e){for(var i=0;i=0;e--)if(i=a[e][0],l(i,o)){a[e].push(o),m=!0;break}m||d.push(o)}for(;d.length;){o=d.pop();var f=!1;for(e=a.length-1;e>=0;e--)if(i=a[e][0],n(i,o)){a[e].push(o),f=!0;break}f||a.push([o.reverse()])}return 1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a}}function h(t){var e=[],i=t.slice(0),o=s(i.shift().slice(0));if(o.length>=4){r(o)||o.reverse(),e.push(o);for(var n=0;n=4&&(r(a)&&a.reverse(),e.push(a))}}return e}function c(t){for(var e=[],i=0;i=0;r--){var o=s[r].slice(0);e.push(o)}return e}function p(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function d(t,e){var i={};return"number"==typeof t.x&&"number"==typeof t.y&&(i.type="Point",i.coordinates=[t.x,t.y]),t.points&&(i.type="MultiPoint",i.coordinates=t.points.slice(0)),t.paths&&(1===t.paths.length?(i.type="LineString",i.coordinates=t.paths[0].slice(0)):(i.type="MultiLineString",i.coordinates=t.paths.slice(0))),t.rings&&(i=u(t.rings.slice(0))),(t.geometry||t.attributes)&&(i.type="Feature",i.geometry=t.geometry?d(t.geometry):null,i.properties=t.attributes?p(t.attributes):null,t.attributes&&(i.id=t.attributes[e]||t.attributes.OBJECTID||t.attributes.FID)),i}function m(t,e){e=e||"OBJECTID";var i,s={wkid:4326},r={};switch(t.type){case"Point":r.x=t.coordinates[0],r.y=t.coordinates[1],r.spatialReference=s;break;case"MultiPoint":r.points=t.coordinates.slice(0),r.spatialReference=s;break;case"LineString":r.paths=[t.coordinates.slice(0)],r.spatialReference=s;break;case"MultiLineString":r.paths=t.coordinates.slice(0),r.spatialReference=s;break;case"Polygon":r.rings=h(t.coordinates.slice(0)),r.spatialReference=s;break;case"MultiPolygon":r.rings=c(t.coordinates.slice(0)),r.spatialReference=s;break;case"Feature":t.geometry&&(r.geometry=m(t.geometry,e)),r.attributes=t.properties?p(t.properties):{},t.id&&(r.attributes[e]=t.id);break;case"FeatureCollection":for(r=[],i=0;i=0;n--){var a=g(o[n],i);r.features.push(a)}return r}function L(t){return t=e.Util.trim(t),"/"!==t[t.length-1]&&(t+="/"),t}function x(t){return/\.arcgis\.com.*?FeatureServer/g.test(t)}function S(t){var e;switch(t){case"Point":e="esriGeometryPoint";break;case"MultiPoint":e="esriGeometryMultipoint";break;case"LineString":e="esriGeometryPolyline";break;case"MultiLineString":e="esriGeometryPolyline";break;case"Polygon":e="esriGeometryPolygon";break;case"MultiPolygon":e="esriGeometryPolygon"}return e}function T(){console&&console.warn&&console.warn.apply(console,arguments)}function I(t){var e="";t.f=t.f||"json";for(var i in t)if(t.hasOwnProperty(i)){var s,r=t[i],o=Object.prototype.toString.call(r);e.length&&(e+="&"),s="[object Array]"===o?"[object Object]"===Object.prototype.toString.call(r[0])?JSON.stringify(r):r.join(","):"[object Object]"===o?JSON.stringify(r):"[object Date]"===o?r.valueOf():r,e+=encodeURIComponent(i)+"="+encodeURIComponent(s)}return e}function w(t,i){var s=new window.XMLHttpRequest;return s.onerror=function(r){s.onreadystatechange=e.Util.falseFn,t.call(i,{error:{code:500,message:"XMLHttpRequest error"}},null)},s.onreadystatechange=function(){var r,o;if(4===s.readyState){try{r=JSON.parse(s.responseText)}catch(n){r=null,o={code:500,message:"Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error."}}!o&&r.error&&(o=r.error,r=null),s.onerror=e.Util.falseFn,t.call(i,o,r)}},s.ontimeout=function(){this.onerror()},s}function P(t,e,i,s){var r=w(i,s);return"undefined"!=typeof s&&null!==s&&"undefined"!=typeof s.options&&(r.timeout=s.options.timeout),r.open("POST",t),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.send(I(e)),r}function R(t,e,i,s){var r=w(i,s);return"undefined"!=typeof s&&null!==s&&"undefined"!=typeof s.options&&(r.timeout=s.options.timeout),r.open("GET",t+"?"+I(e),!0),r.send(null),r}function C(t,e,i,s){var r=I(e),o=w(i,s);"undefined"!=typeof s&&null!==s&&"undefined"!=typeof s.options&&(o.timeout=s.options.timeout);var n=(t+"?"+r).length;if(2e3>=n&&X.cors)o.open("GET",t+"?"+r),o.send(null);else{if(!(n>2e3&&X.cors))return 2e3>=n&&!X.cors?O(t,e,i,s):void T("a request to "+t+" was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html");o.open("POST",t),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(r)}return o}function O(t,i,s,r){window._EsriLeafletCallbacks=window._EsriLeafletCallbacks||{};var o="c"+Y;i.callback="window._EsriLeafletCallbacks."+o;var n=e.DomUtil.create("script",null,document.body);return n.type="text/javascript",n.src=t+"?"+I(i),n.id=o,window._EsriLeafletCallbacks[o]=function(t){if(window._EsriLeafletCallbacks[o]!==!0){var e,i=Object.prototype.toString.call(t);"[object Object]"!==i&&"[object Array]"!==i&&(e={error:{code:500,message:"Expected array or object as JSONP response"}},t=null),!e&&t.error&&(e=t,t=null),s.call(r,e,t),window._EsriLeafletCallbacks[o]=!0}},Y++,{id:o,url:n.src,abort:function(){window._EsriLeafletCallbacks._callback[o]({code:0,message:"Request aborted."})}}}function F(t){return new it(t)}function k(t){return new st(t)}function M(t){return new rt(t)}function E(t){return new ot(t)}function G(t){return new nt(t)}function q(t){return new at(t)}function A(t){return new lt(t)}function U(t){return new ut(t)}function D(t){return new ht(t)}function B(t){return new ct(t)}function z(t){return new pt(t)}function j(t,e){return new mt(t,e)}function Z(t,e){return new ft(t,e)}function N(t,e){return new _t(t,e)}function W(t,e){return new vt(t,e)}function J(t){this.values=[].concat(t||[])}function Q(t){return new xt(t)}e="default"in e?e["default"]:e;var H="2.0.0-beta.8",K=window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest,V=""===document.documentElement.style.pointerEvents,X={cors:K,pointerEvents:V},$={shallowClone:y,warn:T,cleanUrl:L,isArcgisOnline:x,geojsonTypeToArcGIS:S,responseToFeatureCollection:b,geojsonToArcGIS:f,arcgisToGeoJSON:g,boundsToExtent:v,extentToBounds:_},Y=0,tt=X.cors?R:O;tt.CORS=R,tt.JSONP=O;var et={request:C,get:tt,post:P},it=e.Class.extend({options:{proxy:!1,useCors:K},generateSetter:function(t,i){return e.Util.bind(function(e){return this.params[t]=e,this},i)},initialize:function(t){if(t.request&&t.options?(this._service=t,e.Util.setOptions(this,t.options)):(e.Util.setOptions(this,t),this.options.url=L(t.url)),this.params=e.Util.extend({},this.params||{}),this.setters)for(var i in this.setters){var s=this.setters[i];this[i]=this.generateSetter(s,this)}},token:function(t){return this._service?this._service.authenticate(t):this.params.token=t,this},request:function(t,e){return this._service?this._service.request(this.path,this.params,t,e):this._request("request",this.path,this.params,t,e)},_request:function(t,e,i,s,r){var o=this.options.proxy?this.options.proxy+"?"+this.options.url+e:this.options.url+e;return"get"!==t&&"request"!==t||this.options.useCors?et[t](o,i,s,r):et.get.JSONP(o,i,s,r)}}),st=it.extend({setters:{offset:"offset",limit:"limit",fields:"outFields",precision:"geometryPrecision",featureIds:"objectIds",returnGeometry:"returnGeometry",token:"token"},path:"query",params:{returnGeometry:!0,where:"1=1",outSr:4326,outFields:"*"},within:function(t){return this._setGeometry(t),this.params.spatialRel="esriSpatialRelContains",this},intersects:function(t){return this._setGeometry(t),this.params.spatialRel="esriSpatialRelIntersects",this},contains:function(t){return this._setGeometry(t),this.params.spatialRel="esriSpatialRelWithin",this},crosses:function(t){return this._setGeometry(t),this.params.spatialRel="esriSpatialRelCrosses",this},touches:function(t){return this._setGeometry(t),this.params.spatialRel="esriSpatialRelTouches",this},overlaps:function(t){return this._setGeometry(t),this.params.spatialRel="esriSpatialRelOverlaps",this},nearby:function(t,i){return t=e.latLng(t),this.params.geometry=[t.lng,t.lat],this.params.geometryType="esriGeometryPoint",this.params.spatialRel="esriSpatialRelIntersects",this.params.units="esriSRUnit_Meter",this.params.distance=i,this.params.inSr=4326,this},where:function(t){return this.params.where=t,this},between:function(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},orderBy:function(t,e){return e=e||"ASC",this.params.orderByFields=this.params.orderByFields?this.params.orderByFields+",":"",this.params.orderByFields+=[t,e].join(" "),this},run:function(t,e){return this._cleanParams(),$.isArcgisOnline(this.options.url)?(this.params.f="geojson",this.request(function(i,s){this._trapSQLerrors(i),t.call(e,i,s,s)},this)):this.request(function(i,s){this._trapSQLerrors(i),t.call(e,i,s&&$.responseToFeatureCollection(s),s)},this)},count:function(t,e){return this._cleanParams(),this.params.returnCountOnly=!0,this.request(function(e,i){t.call(this,e,i&&i.count,i)},e)},ids:function(t,e){return this._cleanParams(),this.params.returnIdsOnly=!0,this.request(function(e,i){t.call(this,e,i&&i.objectIds,i)},e)},bounds:function(t,e){return this._cleanParams(),this.params.returnExtentOnly=!0,this.request(function(i,s){t.call(e,i,s&&s.extent&&$.extentToBounds(s.extent),s)},e)},pixelSize:function(t){return t=e.point(t),this.params.pixelSize=[t.x,t.y],this},layer:function(t){return this.path=t+"/query",this},_trapSQLerrors:function(t){t&&"400"===t.code&&$.warn("one common syntax error in query requests is encasing string values in double quotes instead of single quotes")},_cleanParams:function(){delete this.params.returnIdsOnly,delete this.params.returnExtentOnly,delete this.params.returnCountOnly},_setGeometry:function(t){return this.params.inSr=4326,t instanceof e.LatLngBounds?(this.params.geometry=$.boundsToExtent(t),void(this.params.geometryType="esriGeometryEnvelope")):(t.getLatLng&&(t=t.getLatLng()),t instanceof e.LatLng&&(t={type:"Point",coordinates:[t.lng,t.lat]}),t instanceof e.GeoJSON&&(t=t.getLayers()[0].feature.geometry,this.params.geometry=$.geojsonToArcGIS(t),this.params.geometryType=$.geojsonTypeToArcGIS(t.type)),t.toGeoJSON&&(t=t.toGeoJSON()),"Feature"===t.type&&(t=t.geometry),"Point"===t.type||"LineString"===t.type||"Polygon"===t.type?(this.params.geometry=$.geojsonToArcGIS(t),void(this.params.geometryType=$.geojsonTypeToArcGIS(t.type))):void $.warn("invalid geometry passed to spatial query. Should be an L.LatLng, L.LatLngBounds or L.Marker or a GeoJSON Point Line or Polygon object"))}}),rt=it.extend({setters:{contains:"contains",text:"searchText",fields:"searchFields",spatialReference:"sr",sr:"sr",layers:"layers",returnGeometry:"returnGeometry",maxAllowableOffset:"maxAllowableOffset",precision:"geometryPrecision",dynamicLayers:"dynamicLayers",returnZ:"returnZ",returnM:"returnM",gdbVersion:"gdbVersion",token:"token"},path:"find",params:{sr:4326,contains:!0,returnGeometry:!0,returnZ:!0,returnM:!1},layerDefs:function(t,e){return this.params.layerDefs=this.params.layerDefs?this.params.layerDefs+";":"",this.params.layerDefs+=[t,e].join(":"),this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*e,this},run:function(t,e){return this.request(function(i,s){t.call(e,i,s&&$.responseToFeatureCollection(s),s)},e)}}),ot=it.extend({path:"identify",between:function(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this}}),nt=ot.extend({setters:{layers:"layers",precision:"geometryPrecision",tolerance:"tolerance",returnGeometry:"returnGeometry"},params:{sr:4326,layers:"all",tolerance:3,returnGeometry:!0},on:function(t){var e=$.boundsToExtent(t.getBounds()),i=t.getSize();return this.params.imageDisplay=[i.x,i.y,96],this.params.mapExtent=[e.xmin,e.ymin,e.xmax,e.ymax],this},at:function(t){return t=e.latLng(t),this.params.geometry=[t.lng,t.lat],this.params.geometryType="esriGeometryPoint",this},layerDef:function(t,e){return this.params.layerDefs=this.params.layerDefs?this.params.layerDefs+";":"",this.params.layerDefs+=[t,e].join(":"),this},simplify:function(t,e){var i=Math.abs(t.getBounds().getWest()-t.getBounds().getEast());return this.params.maxAllowableOffset=i/t.getSize().y*(1-e),this},run:function(t,e){return this.request(function(i,s){if(i)return void t.call(e,i,void 0,s);var r=$.responseToFeatureCollection(s);s.results=s.results.reverse();for(var o=0;o=0;o--)r.catalogItems.features[o].properties.catalogItemVisibility=s[o];return r}}),lt=e.Evented.extend({options:{proxy:!1,useCors:K,timeout:0},initialize:function(t){t=t||{},this._requestQueue=[],this._authenticating=!1,e.Util.setOptions(this,t),this.options.url=L(this.options.url)},get:function(t,e,i,s){return this._request("get",t,e,i,s)},post:function(t,e,i,s){return this._request("post",t,e,i,s)},request:function(t,e,i,s){return this._request("request",t,e,i,s)},metadata:function(t,e){return this._request("get","",{},t,e)},authenticate:function(t){return this._authenticating=!1,this.options.token=t,this._runQueue(),this},getTimeout:function(){return this.options.timeout},setTimeout:function(t){this.options.timeout=t},_request:function(t,e,i,s,r){this.fire("requeststart",{url:this.options.url+e,params:i,method:t},!0);var o=this._createServiceCallback(t,e,i,s,r);if(this.options.token&&(i.token=this.options.token),this._authenticating)return void this._requestQueue.push([t,e,i,s,r]);var n=this.options.proxy?this.options.proxy+"?"+this.options.url+e:this.options.url+e;return"get"!==t&&"request"!==t||this.options.useCors?et[t](n,i,o,r):et.get.JSONP(n,i,o,r)},_createServiceCallback:function(t,i,s,r,o){return e.Util.bind(function(n,a){!n||499!==n.code&&498!==n.code||(this._authenticating=!0,this._requestQueue.push([t,i,s,r,o]),this.fire("authenticationrequired",{authenticate:e.Util.bind(this.authenticate,this)},!0),n.authenticate=e.Util.bind(this.authenticate,this)),r.call(o,n,a),n?this.fire("requesterror",{url:this.options.url+i,params:s,message:n.message,code:n.code,method:t},!0):this.fire("requestsuccess",{url:this.options.url+i,params:s,response:a,method:t},!0),this.fire("requestend",{url:this.options.url+i,params:s,method:t},!0)},this)},_runQueue:function(){for(var t=this._requestQueue.length-1;t>=0;t--){var e=this._requestQueue[t],i=e.shift();this[i].apply(this,e)}this._requestQueue=[]}}),ut=lt.extend({identify:function(){return G(this)},find:function(){return M(this)},query:function(){return k(this)}}),ht=lt.extend({query:function(){return k(this)},identify:function(){return q(this)}}),ct=lt.extend({options:{idAttribute:"OBJECTID"},query:function(){return k(this)},addFeature:function(t,e,i){return delete t.id,t=f(t),this.post("addFeatures",{features:[t]},function(t,s){var r=s&&s.addResults?s.addResults[0]:void 0;e&&e.call(i,t||s.addResults[0].error,r)},i)},updateFeature:function(t,e,i){return t=f(t,this.options.idAttribute),this.post("updateFeatures",{features:[t]},function(t,s){var r=s&&s.updateResults?s.updateResults[0]:void 0;e&&e.call(i,t||s.updateResults[0].error,r)},i)},deleteFeature:function(t,e,i){return this.post("deleteFeatures",{objectIds:t},function(t,s){var r=s&&s.deleteResults?s.deleteResults[0]:void 0;e&&e.call(i,t||s.deleteResults[0].error,r)},i)},deleteFeatures:function(t,e,i){return this.post("deleteFeatures",{objectIds:t},function(t,s){var r=s&&s.deleteResults?s.deleteResults:void 0;e&&e.call(i,t||s.deleteResults[0].error,r)},i)}}),pt=e.Control.extend({options:{position:"bottomright",marginTop:0,marginLeft:0,marginBottom:0,marginRight:0},onAdd:function(){var t=e.DomUtil.create("div","esri-leaflet-logo");return t.style.marginTop=this.options.marginTop,t.style.marginLeft=this.options.marginLeft,t.style.marginBottom=this.options.marginBottom,t.style.marginRight=this.options.marginRight,t.innerHTML='',t}}),dt="https:"!==window.location.protocol?"http:":"https:",mt=e.TileLayer.extend({statics:{TILES:{Streets:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",attributionUrl:"https://static.arcgis.com/attribution/World_Street_Map",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"Esri"}},Topographic:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",attributionUrl:"https://static.arcgis.com/attribution/World_Topo_Map",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"Esri"}},Oceans:{urlTemplate:dt+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",attributionUrl:"https://static.arcgis.com/attribution/Ocean_Basemap",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"Esri"}},OceansLabels:{urlTemplate:dt+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],pane:V?"esri-labels":"tilePane"}},NationalGeographic:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"National Geographic, Esri, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp."}},DarkGray:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors"}},DarkGrayLabels:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],pane:V?"esri-labels":"tilePane"}},Gray:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors"}},GrayLabels:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:16,subdomains:["server","services"],pane:V?"esri-labels":"tilePane"}},Imagery:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"Esri, DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community"}},ImageryLabels:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],pane:V?"esri-labels":"tilePane"}},ImageryTransportation:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:19,subdomains:["server","services"],pane:V?"esri-labels":"tilePane"}},ShadedRelief:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"Esri, USGS"}},ShadedReliefLabels:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:12,subdomains:["server","services"],pane:V?"esri-labels":"tilePane"}},Terrain:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!1,logoPosition:"bottomright",minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"Esri, USGS, NOAA"}},TerrainLabels:{urlTemplate:dt+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}",options:{hideLogo:!0,logoPosition:"bottomright",minZoom:1,maxZoom:13,subdomains:["server","services"],pane:V?"esri-labels":"tilePane"}}}},initialize:function(t,i){var s;if("object"==typeof t&&t.urlTemplate&&t.options)s=t;else{if("string"!=typeof t||!mt.TILES[t])throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of "Streets", "Topographic", "Oceans", "OceansLabels", "NationalGeographic", "Gray", "GrayLabels", "DarkGray", "DarkGrayLabels", "Imagery", "ImageryLabels", "ImageryTransportation", "ShadedRelief", "ShadedReliefLabels", "Terrain" or "TerrainLabels"');s=mt.TILES[t]}var r=e.Util.extend(s.options,i);e.Util.setOptions(this,r),e.TileLayer.prototype.initialize.call(this,s.urlTemplate,r),s.attributionUrl&&this._getAttributionData(s.attributionUrl),this._logo=z({position:this.options.logoPosition})},onAdd:function(t){this.options.hideLogo||t._hasEsriLogo||(this._logo.addTo(t),t._hasEsriLogo=!0),"esri-labels"===this.options.pane&&this._initPane(),t.on("moveend",this._updateMapAttribution,this),e.TileLayer.prototype.onAdd.call(this,t)},onRemove:function(t){this._logo&&this._logo._container&&(t.removeControl(this._logo),t._hasEsriLogo=!1),t.off("moveend",this._updateMapAttribution,this),e.TileLayer.prototype.onRemove.call(this,t)},getAttribution:function(){if(this.options.attribution)var t=''+this.options.attribution+"";return t},_initPane:function(){if(!this._map.getPane(this.options.pane)){var t=this._map.createPane(this.options.pane);t.style.pointerEvents="none",t.style.zIndex=500}},_getAttributionData:function(t){O(t,{},e.Util.bind(function(t,i){if(!t){this._attributions=[];for(var s=0;s=r.minZoom&&i<=r.maxZoom&&(t+=", "+o)}t=t.substr(2);var n=this._map.attributionControl._container.querySelector(".esri-attributions");n.innerHTML=t,n.style.maxWidth=.65*this._map.getSize().x+"px",this.fire("attributionupdated",{attribution:t})}}}),ft=e.TileLayer.extend({options:{zoomOffsetAllowance:.1},statics:{MercatorZoomLevels:{0:156543.033928,1:78271.5169639999,2:39135.7584820001,3:19567.8792409999,4:9783.93962049996,5:4891.96981024998,6:2445.98490512499,7:1222.99245256249,8:611.49622628138,9:305.748113140558,10:152.874056570411,11:76.4370282850732,12:38.2185141425366,13:19.1092570712683,14:9.55462853563415,15:4.77731426794937,16:2.38865713397468,17:1.19432856685505,18:.597164283559817,19:.298582141647617,20:.14929107082381,21:.07464553541191,22:.0373227677059525,23:.0186613838529763}},initialize:function(t){t.url=L(t.url),t=e.Util.setOptions(this,t),this.tileUrl=t.url+"tile/{z}/{y}/{x}",this.service=U(t),this.service.addEventParent(this);var i=new RegExp(/tiles.arcgis(online)?\.com/g);i.test(t.url)&&(this.tileUrl=this.tileUrl.replace("://tiles","://tiles{s}"),t.subdomains=["1","2","3","4"]),this.options.token&&(this.tileUrl+="?token="+this.options.token),e.TileLayer.prototype.initialize.call(this,this.tileUrl,t)},getTileUrl:function(t){return e.Util.template(this.tileUrl,e.extend({s:this._getSubdomain(t),z:this._lodMap&&this._lodMap[t.z]?this._lodMap[t.z]:t.z,x:t.x,y:t.y},this.options))},createTile:function(t,i){var s=document.createElement("img");return e.DomEvent.on(s,"load",e.bind(this._tileOnLoad,this,i,s)),e.DomEvent.on(s,"error",e.bind(this._tileOnError,this,i,s)),this.options.crossOrigin&&(s.crossOrigin=""),s.alt="",!this._lodMap||this._lodMap&&this._lodMap[t.z]?s.src=this.getTileUrl(t):this.once("lodmap",function(){s.src=this.getTileUrl(t)},this),s},onAdd:function(t){t.options.crs!==e.CRS.EPSG3857||this._lodMap||(this._lodMap={},this.metadata(function(t,e){if(!t){var i=e.spatialReference.latestWkid||e.spatialReference.wkid;if(102100===i||3857===i){for(var s=e.tileInfo.lods,r=ft.MercatorZoomLevels,o=0;os}}),gt=e.ImageOverlay.extend({onAdd:function(t){this._topLeft=t.getPixelBounds().min,e.ImageOverlay.prototype.onAdd.call(this,t)},_reset:function(){this._map.options.crs===e.CRS.EPSG3857?e.ImageOverlay.prototype._reset.call(this):e.DomUtil.setPosition(this._image,this._topLeft.subtract(this._map.getPixelOrigin()))}}),yt=e.Layer.extend({options:{opacity:1,position:"front",f:"image",useCors:K,attribution:null,interactive:!1,alt:""},onAdd:function(t){this._update=e.Util.throttle(this._update,this.options.updateInterval,this),t.on("moveend",this._update,this),this._currentImage&&this._currentImage._bounds.equals(this._map.getBounds())?t.addLayer(this._currentImage):this._currentImage&&(this._map.removeLayer(this._currentImage),this._currentImage=null),this._update(),this._popup&&(this._map.on("click",this._getPopupData,this),this._map.on("dblclick",this._resetPopupState,this))},onRemove:function(t){this._currentImage&&this._map.removeLayer(this._currentImage),this._popup&&(this._map.off("click",this._getPopupData,this),this._map.off("dblclick",this._resetPopupState,this)),this._map.off("moveend",this._update,this)},bindPopup:function(t,i){return this._shouldRenderPopup=!1,this._lastClick=!1,this._popup=e.popup(i),this._popupFunction=t,this._map&&(this._map.on("click",this._getPopupData,this),this._map.on("dblclick",this._resetPopupState,this)),this},unbindPopup:function(){return this._map&&(this._map.closePopup(this._popup),this._map.off("click",this._getPopupData,this),this._map.off("dblclick",this._resetPopupState,this)),this._popup=!1,this},bringToFront:function(){return this.options.position="front",this._currentImage&&this._currentImage.bringToFront(),this},bringToBack:function(){return this.options.position="back",this._currentImage&&this._currentImage.bringToBack(),this},getAttribution:function(){return this.options.attribution},getOpacity:function(){return this.options.opacity},setOpacity:function(t){return this.options.opacity=t,this._currentImage.setOpacity(t),this},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(t,e){return this.options.from=t,this.options.to=e,this._update(),this},metadata:function(t,e){return this.service.metadata(t,e),this},authenticate:function(t){return this.service.authenticate(t),this},_renderImage:function(t,e){if(this._map){var i=new gt(t,e,{opacity:0,crossOrigin:this.options.useCors,
+alt:this.options.alt,pane:this.options.pane||this.getPane(),interactive:this.options.interactive}).addTo(this._map);i.once("load",function(t){if(this._map){var i=t.target,s=this._currentImage;i._bounds.equals(e)&&i._bounds.equals(this._map.getBounds())?(this._currentImage=i,"front"===this.options.position?this.bringToFront():this.bringToBack(),this._map&&this._currentImage._map?this._currentImage.setOpacity(this.options.opacity):this._currentImage._map.removeLayer(this._currentImage),s&&this._map&&this._map.removeLayer(s),s&&s._map&&s._map.removeLayer(s)):this._map.removeLayer(i)}this.fire("load",{bounds:e})},this),this.fire("loading",{bounds:e})}},_update:function(){if(this._map){var t=this._map.getZoom(),e=this._map.getBounds();if(!(this._animatingZoom||this._map._panTransition&&this._map._panTransition._inProgress)){if(t>this.options.maxZoom||t0||n.ys;s++)this._addCell(o[s])},_isValidCell:function(t){var i=this._map.options.crs;if(!i.infinite){var s=this._cellNumBounds;if(!i.wrapLng&&(t.xs.max.x)||!i.wrapLat&&(t.ys.max.y))return!1}if(!this.options.bounds)return!0;var r=this._cellCoordsToBounds(t);return e.latLngBounds(this.options.bounds).intersects(r)},_cellCoordsToBounds:function(t){var i=this._map,s=this.options.cellSize,r=t.multiplyBy(s),o=r.add([s,s]),n=i.wrapLatLng(i.unproject(r,t.z)),a=i.wrapLatLng(i.unproject(o,t.z));return e.latLngBounds(n,a)},_cellCoordsToKey:function(t){return t.x+":"+t.y},_keyToCellCoords:function(t){var i=t.split(":"),s=parseInt(i[0],10),r=parseInt(i[1],10);return e.point(s,r)},_removeOtherCells:function(t){for(var e in this._cells)t.contains(this._keyToCellCoords(e))||this._removeCell(e)},_removeCell:function(t){var e=this._activeCells[t];e&&(delete this._activeCells[t],this.cellLeave&&this.cellLeave(e.bounds,e.coords),this.fire("cellleave",{bounds:e.bounds,coords:e.coords}))},_removeCells:function(){for(var t in this._cells){var e=this._cells[t].bounds,i=this._cells[t].coords;this.cellLeave&&this.cellLeave(e,i),this.fire("cellleave",{bounds:e,coords:i})}},_addCell:function(t){this._wrapCoords(t);var e=this._cellCoordsToKey(t),i=this._cells[e];i&&!this._activeCells[e]&&(this.cellEnter&&this.cellEnter(i.bounds,t),this.fire("cellenter",{bounds:i.bounds,coords:t}),this._activeCells[e]=i),i||(i={coords:t,bounds:this._cellCoordsToBounds(t)},this._cells[e]=i,this._activeCells[e]=i,this.createCell&&this.createCell(i.bounds,t),this.fire("cellcreate",{bounds:i.bounds,coords:t}))},_wrapCoords:function(t){t.x=this._wrapLng?e.Util.wrapNum(t.x,this._wrapLng):t.x,t.y=this._wrapLat?e.Util.wrapNum(t.y,this._wrapLat):t.y},_getCellNumBounds:function(){var t=this._map.getPixelWorldBounds(),i=this._getCellSize();return t?e.bounds(t.min.divideBy(i).floor(),t.max.divideBy(i).ceil().subtract([1,1])):null}});J.prototype.query=function(t){var e=this.getIndex(t);return this.values[e]},J.prototype.getIndex=function(t){this.dirty&&this.sort();for(var e,i,s=0,r=this.values.length-1;r>=s;)if(e=(s+r)/2|0,i=this.values[Math.round(e)],+i.value<+t)s=e+1;else{if(!(+i.value>+t))return e;r=e-1}return Math.abs(~r)},J.prototype.between=function(t,e){var i=this.getIndex(t),s=this.getIndex(e);if(0===i&&0===s)return[];for(;this.values[i-1]&&this.values[i-1].value===t;)i--;for(;this.values[s+1]&&this.values[s+1].value===e;)s++;return this.values[s]&&this.values[s].value===e&&this.values[s+1]&&s++,this.values.slice(i,s)},J.prototype.insert=function(t){return this.values.splice(this.getIndex(t.value),0,t),this},J.prototype.bulkAdd=function(t,e){return this.values=this.values.concat([].concat(t||[])),e?this.sort():this.dirty=!0,this},J.prototype.sort=function(){return this.values.sort(function(t,e){return+e.value-+t.value}).reverse(),this.dirty=!1,this};var Lt=bt.extend({options:{attribution:null,where:"1=1",fields:["*"],from:!1,to:!1,timeField:!1,timeFilterMode:"server",simplifyFactor:0,precision:6},initialize:function(t){if(bt.prototype.initialize.call(this,t),t.url=L(t.url),t=e.setOptions(this,t),this.service=B(t),this.service.addEventParent(this),"*"!==this.options.fields[0]){for(var i=!1,s=0;s=0;s--){var r=t[s].id;this._currentSnapshot.push(r),this._cache[i].push(r)}this.options.timeField&&this._buildTimeIndexes(t),this.createLayers(t)},_buildQuery:function(t){var e=this.service.query().intersects(t).where(this.options.where).fields(this.options.fields).precision(this.options.precision);return this.options.simplifyFactor&&e.simplify(this._map,this.options.simplifyFactor),"server"===this.options.timeFilterMode&&this.options.from&&this.options.to&&e.between(this.options.from,this.options.to),e},setWhere:function(t,i,s){this.options.where=t&&t.length?t:"1=1";for(var r=[],o=[],n=0,a=null,l=e.Util.bind(function(t,l){if(t&&(a=t),l)for(var u=l.features.length-1;u>=0;u--)o.push(l.features[u].id);n--,0>=n&&(this._currentSnapshot=o,e.Util.requestAnimFrame(e.Util.bind(function(){this.removeLayers(r),this.addLayers(o),i&&i.call(s,a)},this)))},this),u=this._currentSnapshot.length-1;u>=0;u--)r.push(this._currentSnapshot[u]);for(var h in this._activeCells){n++;var c=this._keyToCellCoords(h),p=this._cellCoordsToBounds(c);this._requestFeatures(p,h,l)}return this},getWhere:function(){return this.options.where},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(t,i,s,r){var o=this.options.from,n=this.options.to,a=0,l=null,u=e.Util.bind(function(e){e&&(l=e),this._filterExistingFeatures(o,n,t,i),a--,s&&0>=a&&s.call(r,l)},this);if(this.options.from=t,this.options.to=i,this._filterExistingFeatures(o,n,t,i),"server"===this.options.timeFilterMode)for(var h in this._activeCells){a++;var c=this._keyToCellCoords(h),p=this._cellCoordsToBounds(c);this._requestFeatures(p,h,u)}return this},refresh:function(){for(var t in this._activeCells){var e=this._keyToCellCoords(t),i=this._cellCoordsToBounds(e);this._requestFeatures(i,t)}this.redraw&&this.once("load",function(){this.eachFeature(function(t){this._redraw(t.feature.id)},this)},this)},_filterExistingFeatures:function(t,i,s,r){var o=t&&i?this._getFeaturesInTimeRange(t,i):this._currentSnapshot,n=this._getFeaturesInTimeRange(s,r);if(n.indexOf)for(var a=0;a=0&&o.splice(l,1)}e.Util.requestAnimFrame(e.Util.bind(function(){this.removeLayers(o),this.addLayers(n)},this))},_getFeaturesInTimeRange:function(t,e){var i,s=[];if(this.options.timeField.start&&this.options.timeField.end){var r=this._startTimeIndex.between(t,e),o=this._endTimeIndex.between(t,e);i=r.concat(o)}else i=this._timeIndex.between(t,e);for(var n=i.length-1;n>=0;n--)s.push(i[n].id);return s},_buildTimeIndexes:function(t){var e,i;if(this.options.timeField.start&&this.options.timeField.end){var s=[],r=[];for(e=t.length-1;e>=0;e--)i=t[e],s.push({id:i.id,value:new Date(i.properties[this.options.timeField.start])}),r.push({id:i.id,value:new Date(i.properties[this.options.timeField.end])});this._startTimeIndex.bulkAdd(s),this._endTimeIndex.bulkAdd(r)}else{var o=[];for(e=t.length-1;e>=0;e--)i=t[e],o.push({id:i.id,value:new Date(i.properties[this.options.timeField])});this._timeIndex.bulkAdd(o)}},_featureWithinTimeRange:function(t){if(!this.options.from||!this.options.to)return!0;var e=+this.options.from.valueOf(),i=+this.options.to.valueOf();if("string"==typeof this.options.timeField){var s=+t.properties[this.options.timeField];return s>=e&&i>=s}if(this.options.timeField.start&&this.options.timeField.end){var r=+t.properties[this.options.timeField.start],o=+t.properties[this.options.timeField.end];return r>=e&&i>=r||o>=e&&i>=o}},_visibleZoom:function(){if(!this._map)return!1;var t=this._map.getZoom();return t>this.options.maxZoom||t0)for(var r=0;r=0;e--){var i,s=t[e],r=this._layers[s.id];this._visibleZoom()&&r&&!this._map.hasLayer(r)&&this._map.addLayer(r),r&&this.options.simplifyFactor>0&&(r.setLatLngs||r.setLatLng)&&this._updateLayer(r,s),r||(i=this.createNewLayer(s),i.feature=s,i.addEventParent(this),this.options.onEachFeature&&this.options.onEachFeature(i.feature,i),this._layers[i.feature.id]=i,this.setFeatureStyle(i.feature.id,this.options.style),this.fire("createfeature",{feature:i.feature},!0),this._visibleZoom()&&(!this.options.timeField||this.options.timeField&&this._featureWithinTimeRange(s))&&this._map.addLayer(i))}},addLayers:function(t){for(var e=t.length-1;e>=0;e--){var i=this._layers[t[e]];i&&(this.fire("addfeature",{feature:i.feature},!0),this._map.addLayer(i))}},removeLayers:function(t,e){for(var i=t.length-1;i>=0;i--){var s=t[i],r=this._layers[s];r&&(this.fire("removefeature",{feature:r.feature,permanent:e},!0),this._map.removeLayer(r)),r&&e&&delete this._layers[s]}},cellEnter:function(t,i){!this._zooming&&this._map&&e.Util.requestAnimFrame(e.Util.bind(function(){var t=this._cacheKey(i),e=this._cellCoordsToKey(i),s=this._cache[t];this._activeCells[e]&&s&&this.addLayers(s)},this))},cellLeave:function(t,i){this._zooming||e.Util.requestAnimFrame(e.Util.bind(function(){if(this._map){var t=this._cacheKey(i),e=this._cellCoordsToKey(i),s=this._cache[t],r=this._map.getBounds();if(!this._activeCells[e]&&s){for(var o=!0,n=0;n (http://patrickarlt.com)\",\n \"browser\": \"dist/esri-leaflet-debug.js\",\n \"bugs\": {\n \"url\": \"https://github.com/esri/esri-leaflet/issues\"\n },\n \"contributors\": [\n \"Patrick Arlt (http://patrickarlt.com)\",\n \"John Gravois (http://johngravois.com)\"\n ],\n \"dependencies\": {\n \"arcgis-to-geojson-utils\": \"^1.0.1\",\n \"leaflet\": \"^1.0.0-beta.2\",\n \"leaflet-virtual-grid\": \"^1.0.3\",\n \"tiny-binary-search\": \"^1.0.2\"\n },\n \"devDependencies\": {\n \"chai\": \"2.3.0\",\n \"eslint\": \"^1.10.2\",\n \"gh-release\": \"^2.0.0\",\n \"highlight.js\": \"^8.0.0\",\n \"http-server\": \"^0.8.5\",\n \"isparta\": \"^3.0.3\",\n \"istanbul\": \"^0.4.2\",\n \"karma\": \"^0.12.16\",\n \"karma-chai-sinon\": \"^0.1.3\",\n \"karma-coverage\": \"^0.5.3\",\n \"karma-mocha\": \"^0.1.0\",\n \"karma-mocha-reporter\": \"^0.2.5\",\n \"karma-phantomjs-launcher\": \"^0.2.0\",\n \"karma-sourcemap-loader\": \"^0.3.5\",\n \"load-grunt-tasks\": \"^0.4.0\",\n \"mkdirp\": \"^0.5.1\",\n \"mocha\": \"^2.3.4\",\n \"phantomjs\": \"^1.9.17\",\n \"rollup\": \"^0.25.4\",\n \"rollup-plugin-json\": \"^2.0.0\",\n \"rollup-plugin-node-resolve\": \"^1.4.0\",\n \"rollup-plugin-npm\": \"^1.2.1\",\n \"rollup-plugin-uglify\": \"^0.1.0\",\n \"semistandard\": \"^7.0.5\",\n \"sinon\": \"^1.11.1\",\n \"sinon-chai\": \"2.7.0\",\n \"snazzy\": \"^2.0.1\",\n \"uglify-js\": \"^2.6.1\",\n \"watch\": \"^0.17.1\"\n },\n \"homepage\": \"http://esri.github.io/esri-leaflet\",\n \"jsnext:main\": \"src/EsriLeaflet.js\",\n \"jspm\": {\n \"registry\": \"npm\",\n \"format\": \"es6\",\n \"main\": \"src/EsriLeaflet.js\"\n },\n \"keywords\": [\n \"arcgis\",\n \"esri\",\n \"esri leaflet\",\n \"gis\",\n \"leaflet plugin\",\n \"mapping\"\n ],\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/esri-leaflet-debug.js\",\n \"readmeFilename\": \"README.md\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git@github.com:Esri/esri-leaflet.git\"\n },\n \"scripts\": {\n \"build\": \"rollup -c profiles/debug.js & rollup -c profiles/production.js\",\n \"lint\": \"semistandard src/**/*.js | snazzy\",\n \"prebuild\": \"mkdirp dist\",\n \"prepublish\": \"npm run build\",\n \"pretest\": \"npm run build\",\n \"release\": \"./scripts/release.sh\",\n \"start\": \"watch 'npm run build' src & http-server -p 5000 -c-1 -o\",\n \"test\": \"npm run lint && karma start\"\n }\n}\n","export var cors = ((window.XMLHttpRequest && 'withCredentials' in new window.XMLHttpRequest()));\nexport var pointerEvents = document.documentElement.style.pointerEvents === '';\n\nexport var Support = {\n cors: cors,\n pointerEvents: pointerEvents\n};\n\nexport default Support;\n","/*\n * Copyright 2015 Esri\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the Liscense.\n */\n\n// checks if 2 x,y points are equal\nfunction pointsEqual (a, b) {\n for (var i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n\n// checks if the first and last points of a ring are equal and closes the ring\nfunction closeRing (coordinates) {\n if (!pointsEqual(coordinates[0], coordinates[coordinates.length - 1])) {\n coordinates.push(coordinates[0]);\n }\n return coordinates;\n}\n\n// determine if polygon ring coordinates are clockwise. clockwise signifies outer ring, counter-clockwise an inner ring\n// or hole. this logic was found at http://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-\n// points-are-in-clockwise-order\nfunction ringIsClockwise (ringToTest) {\n var total = 0;\n var i = 0;\n var rLength = ringToTest.length;\n var pt1 = ringToTest[i];\n var pt2;\n for (i; i < rLength - 1; i++) {\n pt2 = ringToTest[i + 1];\n total += (pt2[0] - pt1[0]) * (pt2[1] + pt1[1]);\n pt1 = pt2;\n }\n return (total >= 0);\n}\n\n// ported from terraformer.js https://github.com/Esri/Terraformer/blob/master/terraformer.js#L504-L519\nfunction vertexIntersectsVertex (a1, a2, b1, b2) {\n var uaT = (b2[0] - b1[0]) * (a1[1] - b1[1]) - (b2[1] - b1[1]) * (a1[0] - b1[0]);\n var ubT = (a2[0] - a1[0]) * (a1[1] - b1[1]) - (a2[1] - a1[1]) * (a1[0] - b1[0]);\n var uB = (b2[1] - b1[1]) * (a2[0] - a1[0]) - (b2[0] - b1[0]) * (a2[1] - a1[1]);\n\n if (uB !== 0) {\n var ua = uaT / uB;\n var ub = ubT / uB;\n\n if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) {\n return true;\n }\n }\n\n return false;\n}\n\n// ported from terraformer.js https://github.com/Esri/Terraformer/blob/master/terraformer.js#L521-L531\nfunction arrayIntersectsArray (a, b) {\n for (var i = 0; i < a.length - 1; i++) {\n for (var j = 0; j < b.length - 1; j++) {\n if (vertexIntersectsVertex(a[i], a[i + 1], b[j], b[j + 1])) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n// ported from terraformer.js https://github.com/Esri/Terraformer/blob/master/terraformer.js#L470-L480\nfunction coordinatesContainPoint (coordinates, point) {\n var contains = false;\n for (var i = -1, l = coordinates.length, j = l - 1; ++i < l; j = i) {\n if (((coordinates[i][1] <= point[1] && point[1] < coordinates[j][1]) ||\n (coordinates[j][1] <= point[1] && point[1] < coordinates[i][1])) &&\n (point[0] < (coordinates[j][0] - coordinates[i][0]) * (point[1] - coordinates[i][1]) / (coordinates[j][1] - coordinates[i][1]) + coordinates[i][0])) {\n contains = !contains;\n }\n }\n return contains;\n}\n\n// ported from terraformer-arcgis-parser.js https://github.com/Esri/terraformer-arcgis-parser/blob/master/terraformer-arcgis-parser.js#L106-L113\nfunction coordinatesContainCoordinates (outer, inner) {\n var intersects = arrayIntersectsArray(outer, inner);\n var contains = coordinatesContainPoint(outer, inner[0]);\n if (!intersects && contains) {\n return true;\n }\n return false;\n}\n\n// do any polygons in this array contain any other polygons in this array?\n// used for checking for holes in arcgis rings\n// ported from terraformer-arcgis-parser.js https://github.com/Esri/terraformer-arcgis-parser/blob/master/terraformer-arcgis-parser.js#L117-L172\nfunction convertRingsToGeoJSON (rings) {\n var outerRings = [];\n var holes = [];\n var x; // iterator\n var outerRing; // current outer ring being evaluated\n var hole; // current hole being evaluated\n\n // for each ring\n for (var r = 0; r < rings.length; r++) {\n var ring = closeRing(rings[r].slice(0));\n if (ring.length < 4) {\n continue;\n }\n // is this ring an outer ring? is it clockwise?\n if (ringIsClockwise(ring)) {\n var polygon = [ ring ];\n outerRings.push(polygon); // push to outer rings\n } else {\n holes.push(ring); // counterclockwise push to holes\n }\n }\n\n var uncontainedHoles = [];\n\n // while there are holes left...\n while (holes.length) {\n // pop a hole off out stack\n hole = holes.pop();\n\n // loop over all outer rings and see if they contain our hole.\n var contained = false;\n for (x = outerRings.length - 1; x >= 0; x--) {\n outerRing = outerRings[x][0];\n if (coordinatesContainCoordinates(outerRing, hole)) {\n // the hole is contained push it into our polygon\n outerRings[x].push(hole);\n contained = true;\n break;\n }\n }\n\n // ring is not contained in any outer ring\n // sometimes this happens https://github.com/Esri/esri-leaflet/issues/320\n if (!contained) {\n uncontainedHoles.push(hole);\n }\n }\n\n // if we couldn't match any holes using contains we can try intersects...\n while (uncontainedHoles.length) {\n // pop a hole off out stack\n hole = uncontainedHoles.pop();\n\n // loop over all outer rings and see if any intersect our hole.\n var intersects = false;\n\n for (x = outerRings.length - 1; x >= 0; x--) {\n outerRing = outerRings[x][0];\n if (arrayIntersectsArray(outerRing, hole)) {\n // the hole is contained push it into our polygon\n outerRings[x].push(hole);\n intersects = true;\n break;\n }\n }\n\n if (!intersects) {\n outerRings.push([hole.reverse()]);\n }\n }\n\n if (outerRings.length === 1) {\n return {\n type: 'Polygon',\n coordinates: outerRings[0]\n };\n } else {\n return {\n type: 'MultiPolygon',\n coordinates: outerRings\n };\n }\n}\n\n// This function ensures that rings are oriented in the right directions\n// outer rings are clockwise, holes are counterclockwise\n// used for converting GeoJSON Polygons to ArcGIS Polygons\nfunction orientRings (poly) {\n var output = [];\n var polygon = poly.slice(0);\n var outerRing = closeRing(polygon.shift().slice(0));\n if (outerRing.length >= 4) {\n if (!ringIsClockwise(outerRing)) {\n outerRing.reverse();\n }\n\n output.push(outerRing);\n\n for (var i = 0; i < polygon.length; i++) {\n var hole = closeRing(polygon[i].slice(0));\n if (hole.length >= 4) {\n if (ringIsClockwise(hole)) {\n hole.reverse();\n }\n output.push(hole);\n }\n }\n }\n\n return output;\n}\n\n// This function flattens holes in multipolygons to one array of polygons\n// used for converting GeoJSON Polygons to ArcGIS Polygons\nfunction flattenMultiPolygonRings (rings) {\n var output = [];\n for (var i = 0; i < rings.length; i++) {\n var polygon = orientRings(rings[i]);\n for (var x = polygon.length - 1; x >= 0; x--) {\n var ring = polygon[x].slice(0);\n output.push(ring);\n }\n }\n return output;\n}\n\n// shallow object clone for feature properties and attributes\n// from http://jsperf.com/cloning-an-object/2\nfunction shallowClone (obj) {\n var target = {};\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n target[i] = obj[i];\n }\n }\n return target;\n}\n\nexport function arcgisToGeoJSON (arcgis, idAttribute) {\n var geojson = {};\n\n if (typeof arcgis.x === 'number' && typeof arcgis.y === 'number') {\n geojson.type = 'Point';\n geojson.coordinates = [arcgis.x, arcgis.y];\n }\n\n if (arcgis.points) {\n geojson.type = 'MultiPoint';\n geojson.coordinates = arcgis.points.slice(0);\n }\n\n if (arcgis.paths) {\n if (arcgis.paths.length === 1) {\n geojson.type = 'LineString';\n geojson.coordinates = arcgis.paths[0].slice(0);\n } else {\n geojson.type = 'MultiLineString';\n geojson.coordinates = arcgis.paths.slice(0);\n }\n }\n\n if (arcgis.rings) {\n geojson = convertRingsToGeoJSON(arcgis.rings.slice(0));\n }\n\n if (arcgis.geometry || arcgis.attributes) {\n geojson.type = 'Feature';\n geojson.geometry = (arcgis.geometry) ? arcgisToGeoJSON(arcgis.geometry) : null;\n geojson.properties = (arcgis.attributes) ? shallowClone(arcgis.attributes) : null;\n if (arcgis.attributes) {\n geojson.id = arcgis.attributes[idAttribute] || arcgis.attributes.OBJECTID || arcgis.attributes.FID;\n }\n }\n\n return geojson;\n}\n\nexport function geojsonToArcGIS (geojson, idAttribute) {\n idAttribute = idAttribute || 'OBJECTID';\n var spatialReference = { wkid: 4326 };\n var result = {};\n var i;\n\n switch (geojson.type) {\n case 'Point':\n result.x = geojson.coordinates[0];\n result.y = geojson.coordinates[1];\n result.spatialReference = spatialReference;\n break;\n case 'MultiPoint':\n result.points = geojson.coordinates.slice(0);\n result.spatialReference = spatialReference;\n break;\n case 'LineString':\n result.paths = [geojson.coordinates.slice(0)];\n result.spatialReference = spatialReference;\n break;\n case 'MultiLineString':\n result.paths = geojson.coordinates.slice(0);\n result.spatialReference = spatialReference;\n break;\n case 'Polygon':\n result.rings = orientRings(geojson.coordinates.slice(0));\n result.spatialReference = spatialReference;\n break;\n case 'MultiPolygon':\n result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0));\n result.spatialReference = spatialReference;\n break;\n case 'Feature':\n if (geojson.geometry) {\n result.geometry = geojsonToArcGIS(geojson.geometry, idAttribute);\n }\n result.attributes = (geojson.properties) ? shallowClone(geojson.properties) : {};\n if (geojson.id) {\n result.attributes[idAttribute] = geojson.id;\n }\n break;\n case 'FeatureCollection':\n result = [];\n for (i = 0; i < geojson.features.length; i++) {\n result.push(geojsonToArcGIS(geojson.features[i], idAttribute));\n }\n break;\n case 'GeometryCollection':\n result = [];\n for (i = 0; i < geojson.geometries.length; i++) {\n result.push(geojsonToArcGIS(geojson.geometries[i], idAttribute));\n }\n break;\n }\n\n return result;\n}\n","import L from 'leaflet';\nimport {\n geojsonToArcGIS as g2a,\n arcgisToGeoJSON as a2g\n} from 'arcgis-to-geojson-utils';\n\nexport function geojsonToArcGIS (geojson, idAttr) {\n return g2a(geojson, idAttr);\n}\n\nexport function arcgisToGeoJSON (arcgis, idAttr) {\n return a2g(arcgis, idAttr);\n}\n\n// shallow object clone for feature properties and attributes\n// from http://jsperf.com/cloning-an-object/2\nexport function shallowClone (obj) {\n var target = {};\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n target[i] = obj[i];\n }\n }\n return target;\n}\n\n// convert an extent (ArcGIS) to LatLngBounds (Leaflet)\nexport function extentToBounds (extent) {\n var sw = L.latLng(extent.ymin, extent.xmin);\n var ne = L.latLng(extent.ymax, extent.xmax);\n return L.latLngBounds(sw, ne);\n}\n\n// convert an LatLngBounds (Leaflet) to extent (ArcGIS)\nexport function boundsToExtent (bounds) {\n bounds = L.latLngBounds(bounds);\n return {\n 'xmin': bounds.getSouthWest().lng,\n 'ymin': bounds.getSouthWest().lat,\n 'xmax': bounds.getNorthEast().lng,\n 'ymax': bounds.getNorthEast().lat,\n 'spatialReference': {\n 'wkid': 4326\n }\n };\n}\n\nexport function responseToFeatureCollection (response, idAttribute) {\n var objectIdField;\n\n if (idAttribute) {\n objectIdField = idAttribute;\n } else if (response.objectIdFieldName) {\n objectIdField = response.objectIdFieldName;\n } else if (response.fields) {\n for (var j = 0; j <= response.fields.length - 1; j++) {\n if (response.fields[j].type === 'esriFieldTypeOID') {\n objectIdField = response.fields[j].name;\n break;\n }\n }\n } else {\n objectIdField = 'OBJECTID';\n }\n\n var featureCollection = {\n type: 'FeatureCollection',\n features: []\n };\n var features = response.features || response.results;\n if (features.length) {\n for (var i = features.length - 1; i >= 0; i--) {\n var feature = arcgisToGeoJSON(features[i], objectIdField);\n featureCollection.features.push(feature);\n }\n }\n\n return featureCollection;\n}\n\n // trim url whitespace and add a trailing slash if needed\nexport function cleanUrl (url) {\n // trim leading and trailing spaces, but not spaces inside the url\n url = L.Util.trim(url);\n\n // add a trailing slash to the url if the user omitted it\n if (url[url.length - 1] !== '/') {\n url += '/';\n }\n\n return url;\n}\n\nexport function isArcgisOnline (url) {\n /* hosted feature services can emit geojson natively.\n our check for 'geojson' support will need to be revisted\n once the functionality makes its way to ArcGIS Server*/\n return (/\\.arcgis\\.com.*?FeatureServer/g).test(url);\n}\n\nexport function geojsonTypeToArcGIS (geoJsonType) {\n var arcgisGeometryType;\n switch (geoJsonType) {\n case 'Point':\n arcgisGeometryType = 'esriGeometryPoint';\n break;\n case 'MultiPoint':\n arcgisGeometryType = 'esriGeometryMultipoint';\n break;\n case 'LineString':\n arcgisGeometryType = 'esriGeometryPolyline';\n break;\n case 'MultiLineString':\n arcgisGeometryType = 'esriGeometryPolyline';\n break;\n case 'Polygon':\n arcgisGeometryType = 'esriGeometryPolygon';\n break;\n case 'MultiPolygon':\n arcgisGeometryType = 'esriGeometryPolygon';\n break;\n }\n\n return arcgisGeometryType;\n}\n\nexport function warn () {\n if (console && console.warn) {\n console.warn.apply(console, arguments);\n }\n}\n\nexport var Util = {\n shallowClone: shallowClone,\n warn: warn,\n cleanUrl: cleanUrl,\n isArcgisOnline: isArcgisOnline,\n geojsonTypeToArcGIS: geojsonTypeToArcGIS,\n responseToFeatureCollection: responseToFeatureCollection,\n geojsonToArcGIS: geojsonToArcGIS,\n arcgisToGeoJSON: arcgisToGeoJSON,\n boundsToExtent: boundsToExtent,\n extentToBounds: extentToBounds\n};\n\nexport default Util;\n","import L from 'leaflet';\nimport Support from './Support';\nimport { warn } from './Util';\n\nvar callbacks = 0;\n\nfunction serialize (params) {\n var data = '';\n\n params.f = params.f || 'json';\n\n for (var key in params) {\n if (params.hasOwnProperty(key)) {\n var param = params[key];\n var type = Object.prototype.toString.call(param);\n var value;\n\n if (data.length) {\n data += '&';\n }\n\n if (type === '[object Array]') {\n value = (Object.prototype.toString.call(param[0]) === '[object Object]') ? JSON.stringify(param) : param.join(',');\n } else if (type === '[object Object]') {\n value = JSON.stringify(param);\n } else if (type === '[object Date]') {\n value = param.valueOf();\n } else {\n value = param;\n }\n\n data += encodeURIComponent(key) + '=' + encodeURIComponent(value);\n }\n }\n\n return data;\n}\n\nfunction createRequest (callback, context) {\n var httpRequest = new window.XMLHttpRequest();\n\n httpRequest.onerror = function (e) {\n httpRequest.onreadystatechange = L.Util.falseFn;\n\n callback.call(context, {\n error: {\n code: 500,\n message: 'XMLHttpRequest error'\n }\n }, null);\n };\n\n httpRequest.onreadystatechange = function () {\n var response;\n var error;\n\n if (httpRequest.readyState === 4) {\n try {\n response = JSON.parse(httpRequest.responseText);\n } catch (e) {\n response = null;\n error = {\n code: 500,\n message: 'Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error.'\n };\n }\n\n if (!error && response.error) {\n error = response.error;\n response = null;\n }\n\n httpRequest.onerror = L.Util.falseFn;\n\n callback.call(context, error, response);\n }\n };\n\n httpRequest.ontimeout = function () {\n this.onerror();\n };\n\n return httpRequest;\n}\n\nfunction xmlHttpPost (url, params, callback, context) {\n var httpRequest = createRequest(callback, context);\n\n if (typeof context !== 'undefined' && context !== null) {\n if (typeof context.options !== 'undefined') {\n httpRequest.timeout = context.options.timeout;\n }\n }\n\n httpRequest.open('POST', url);\n httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n httpRequest.send(serialize(params));\n\n return httpRequest;\n}\n\nfunction xmlHttpGet (url, params, callback, context) {\n var httpRequest = createRequest(callback, context);\n\n if (typeof context !== 'undefined' && context !== null) {\n if (typeof context.options !== 'undefined') {\n httpRequest.timeout = context.options.timeout;\n }\n }\n\n httpRequest.open('GET', url + '?' + serialize(params), true);\n httpRequest.send(null);\n\n return httpRequest;\n}\n\n// AJAX handlers for CORS (modern browsers) or JSONP (older browsers)\nexport function request (url, params, callback, context) {\n var paramString = serialize(params);\n var httpRequest = createRequest(callback, context);\n\n if (typeof context !== 'undefined' && context !== null) {\n if (typeof context.options !== 'undefined') {\n httpRequest.timeout = context.options.timeout;\n }\n }\n\n var requestLength = (url + '?' + paramString).length;\n\n // request is less then 2000 characters and the browser supports CORS, make GET request with XMLHttpRequest\n if (requestLength <= 2000 && Support.cors) {\n httpRequest.open('GET', url + '?' + paramString);\n httpRequest.send(null);\n\n // request is less more then 2000 characters and the browser supports CORS, make POST request with XMLHttpRequest\n } else if (requestLength > 2000 && Support.cors) {\n httpRequest.open('POST', url);\n httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n httpRequest.send(paramString);\n\n // request is less more then 2000 characters and the browser does not support CORS, make a JSONP request\n } else if (requestLength <= 2000 && !Support.cors) {\n return jsonp(url, params, callback, context);\n\n // request is longer then 2000 characters and the browser does not support CORS, log a warning\n } else {\n warn('a request to ' + url + ' was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy http://esri.github.io/esri-leaflet/api-reference/request.html');\n return;\n }\n\n return httpRequest;\n}\n\nexport function jsonp (url, params, callback, context) {\n window._EsriLeafletCallbacks = window._EsriLeafletCallbacks || {};\n var callbackId = 'c' + callbacks;\n\n params.callback = 'window._EsriLeafletCallbacks.' + callbackId;\n\n var script = L.DomUtil.create('script', null, document.body);\n script.type = 'text/javascript';\n script.src = url + '?' + serialize(params);\n script.id = callbackId;\n\n window._EsriLeafletCallbacks[callbackId] = function (response) {\n if (window._EsriLeafletCallbacks[callbackId] !== true) {\n var error;\n var responseType = Object.prototype.toString.call(response);\n\n if (!(responseType === '[object Object]' || responseType === '[object Array]')) {\n error = {\n error: {\n code: 500,\n message: 'Expected array or object as JSONP response'\n }\n };\n response = null;\n }\n\n if (!error && response.error) {\n error = response;\n response = null;\n }\n\n callback.call(context, error, response);\n window._EsriLeafletCallbacks[callbackId] = true;\n }\n };\n\n callbacks++;\n\n return {\n id: callbackId,\n url: script.src,\n abort: function () {\n window._EsriLeafletCallbacks._callback[callbackId]({\n code: 0,\n message: 'Request aborted.'\n });\n }\n };\n}\n\nvar get = ((Support.cors) ? xmlHttpGet : jsonp);\nget.CORS = xmlHttpGet;\nget.JSONP = jsonp;\n\n// choose the correct AJAX handler depending on CORS support\nexport { get };\n\n// always use XMLHttpRequest for posts\nexport { xmlHttpPost as post };\n\n// export the Request object to call the different handlers for debugging\nexport var Request = {\n request: request,\n get: get,\n post: xmlHttpPost\n};\n\nexport default Request;\n","import L from 'leaflet';\nimport {cors} from '../Support';\nimport {cleanUrl} from '../Util';\nimport Request from '../Request';\n\nexport var Task = L.Class.extend({\n\n options: {\n proxy: false,\n useCors: cors\n },\n\n // Generate a method for each methodName:paramName in the setters for this task.\n generateSetter: function (param, context) {\n return L.Util.bind(function (value) {\n this.params[param] = value;\n return this;\n }, context);\n },\n\n initialize: function (endpoint) {\n // endpoint can be either a url (and options) for an ArcGIS Rest Service or an instance of EsriLeaflet.Service\n if (endpoint.request && endpoint.options) {\n this._service = endpoint;\n L.Util.setOptions(this, endpoint.options);\n } else {\n L.Util.setOptions(this, endpoint);\n this.options.url = cleanUrl(endpoint.url);\n }\n\n // clone default params into this object\n this.params = L.Util.extend({}, this.params || {});\n\n // generate setter methods based on the setters object implimented a child class\n if (this.setters) {\n for (var setter in this.setters) {\n var param = this.setters[setter];\n this[setter] = this.generateSetter(param, this);\n }\n }\n },\n\n token: function (token) {\n if (this._service) {\n this._service.authenticate(token);\n } else {\n this.params.token = token;\n }\n return this;\n },\n\n request: function (callback, context) {\n if (this._service) {\n return this._service.request(this.path, this.params, callback, context);\n }\n\n return this._request('request', this.path, this.params, callback, context);\n },\n\n _request: function (method, path, params, callback, context) {\n var url = (this.options.proxy) ? this.options.proxy + '?' + this.options.url + path : this.options.url + path;\n\n if ((method === 'get' || method === 'request') && !this.options.useCors) {\n return Request.get.JSONP(url, params, callback, context);\n }\n\n return Request[method](url, params, callback, context);\n }\n});\n\nexport function task (options) {\n return new Task(options);\n}\n\nexport default task;\n","import L from 'leaflet';\nimport { Task } from './Task';\nimport Util from '../Util';\n\nexport var Query = Task.extend({\n setters: {\n 'offset': 'offset',\n 'limit': 'limit',\n 'fields': 'outFields',\n 'precision': 'geometryPrecision',\n 'featureIds': 'objectIds',\n 'returnGeometry': 'returnGeometry',\n 'token': 'token'\n },\n\n path: 'query',\n\n params: {\n returnGeometry: true,\n where: '1=1',\n outSr: 4326,\n outFields: '*'\n },\n\n within: function (geometry) {\n this._setGeometry(geometry);\n this.params.spatialRel = 'esriSpatialRelContains'; // will make code read layer within geometry, to the api this will reads geometry contains layer\n return this;\n },\n\n intersects: function (geometry) {\n this._setGeometry(geometry);\n this.params.spatialRel = 'esriSpatialRelIntersects';\n return this;\n },\n\n contains: function (geometry) {\n this._setGeometry(geometry);\n this.params.spatialRel = 'esriSpatialRelWithin'; // will make code read layer contains geometry, to the api this will reads geometry within layer\n return this;\n },\n\n crosses: function (geometry) {\n this._setGeometry(geometry);\n this.params.spatialRel = 'esriSpatialRelCrosses';\n return this;\n },\n\n touches: function (geometry) {\n this._setGeometry(geometry);\n this.params.spatialRel = 'esriSpatialRelTouches';\n return this;\n },\n\n overlaps: function (geometry) {\n this._setGeometry(geometry);\n this.params.spatialRel = 'esriSpatialRelOverlaps';\n return this;\n },\n\n // only valid for Feature Services running on ArcGIS Server 10.3 or ArcGIS Online\n nearby: function (latlng, radius) {\n latlng = L.latLng(latlng);\n this.params.geometry = [latlng.lng, latlng.lat];\n this.params.geometryType = 'esriGeometryPoint';\n this.params.spatialRel = 'esriSpatialRelIntersects';\n this.params.units = 'esriSRUnit_Meter';\n this.params.distance = radius;\n this.params.inSr = 4326;\n return this;\n },\n\n where: function (string) {\n // instead of converting double-quotes to single quotes, pass as is, and provide a more informative message if a 400 is encountered\n this.params.where = string;\n return this;\n },\n\n between: function (start, end) {\n this.params.time = [start.valueOf(), end.valueOf()];\n return this;\n },\n\n simplify: function (map, factor) {\n var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());\n this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;\n return this;\n },\n\n orderBy: function (fieldName, order) {\n order = order || 'ASC';\n this.params.orderByFields = (this.params.orderByFields) ? this.params.orderByFields + ',' : '';\n this.params.orderByFields += ([fieldName, order]).join(' ');\n return this;\n },\n\n run: function (callback, context) {\n this._cleanParams();\n\n // if the service is hosted on arcgis online request geojson directly\n if (Util.isArcgisOnline(this.options.url)) {\n this.params.f = 'geojson';\n\n return this.request(function (error, response) {\n this._trapSQLerrors(error);\n callback.call(context, error, response, response);\n }, this);\n\n // otherwise convert it in the callback then pass it on\n } else {\n return this.request(function (error, response) {\n this._trapSQLerrors(error);\n callback.call(context, error, (response && Util.responseToFeatureCollection(response)), response);\n }, this);\n }\n },\n\n count: function (callback, context) {\n this._cleanParams();\n this.params.returnCountOnly = true;\n return this.request(function (error, response) {\n callback.call(this, error, (response && response.count), response);\n }, context);\n },\n\n ids: function (callback, context) {\n this._cleanParams();\n this.params.returnIdsOnly = true;\n return this.request(function (error, response) {\n callback.call(this, error, (response && response.objectIds), response);\n }, context);\n },\n\n // only valid for Feature Services running on ArcGIS Server 10.3 or ArcGIS Online\n bounds: function (callback, context) {\n this._cleanParams();\n this.params.returnExtentOnly = true;\n return this.request(function (error, response) {\n callback.call(context, error, (response && response.extent && Util.extentToBounds(response.extent)), response);\n }, context);\n },\n\n // only valid for image services\n pixelSize: function (point) {\n point = L.point(point);\n this.params.pixelSize = [point.x, point.y];\n return this;\n },\n\n // only valid for map services\n layer: function (layer) {\n this.path = layer + '/query';\n return this;\n },\n\n _trapSQLerrors: function (error) {\n if (error) {\n if (error.code === '400') {\n Util.warn('one common syntax error in query requests is encasing string values in double quotes instead of single quotes');\n }\n }\n },\n\n _cleanParams: function () {\n delete this.params.returnIdsOnly;\n delete this.params.returnExtentOnly;\n delete this.params.returnCountOnly;\n },\n\n _setGeometry: function (geometry) {\n this.params.inSr = 4326;\n\n // convert bounds to extent and finish\n if (geometry instanceof L.LatLngBounds) {\n // set geometry + geometryType\n this.params.geometry = Util.boundsToExtent(geometry);\n this.params.geometryType = 'esriGeometryEnvelope';\n return;\n }\n\n // convert L.Marker > L.LatLng\n if (geometry.getLatLng) {\n geometry = geometry.getLatLng();\n }\n\n // convert L.LatLng to a geojson point and continue;\n if (geometry instanceof L.LatLng) {\n geometry = {\n type: 'Point',\n coordinates: [geometry.lng, geometry.lat]\n };\n }\n\n // handle L.GeoJSON, pull out the first geometry\n if (geometry instanceof L.GeoJSON) {\n // reassign geometry to the GeoJSON value (we are assuming that only one feature is present)\n geometry = geometry.getLayers()[0].feature.geometry;\n this.params.geometry = Util.geojsonToArcGIS(geometry);\n this.params.geometryType = Util.geojsonTypeToArcGIS(geometry.type);\n }\n\n // Handle L.Polyline and L.Polygon\n if (geometry.toGeoJSON) {\n geometry = geometry.toGeoJSON();\n }\n\n // handle GeoJSON feature by pulling out the geometry\n if (geometry.type === 'Feature') {\n // get the geometry of the geojson feature\n geometry = geometry.geometry;\n }\n\n // confirm that our GeoJSON is a point, line or polygon\n if (geometry.type === 'Point' || geometry.type === 'LineString' || geometry.type === 'Polygon') {\n this.params.geometry = Util.geojsonToArcGIS(geometry);\n this.params.geometryType = Util.geojsonTypeToArcGIS(geometry.type);\n return;\n }\n\n // warn the user if we havn't found a\n /* global console */\n Util.warn('invalid geometry passed to spatial query. Should be an L.LatLng, L.LatLngBounds or L.Marker or a GeoJSON Point Line or Polygon object');\n\n return;\n }\n});\n\nexport function query (options) {\n return new Query(options);\n}\n\nexport default query;\n","import { Task } from './Task';\nimport Util from '../Util';\n\nexport var Find = Task.extend({\n setters: {\n // method name > param name\n 'contains': 'contains',\n 'text': 'searchText',\n 'fields': 'searchFields', // denote an array or single string\n 'spatialReference': 'sr',\n 'sr': 'sr',\n 'layers': 'layers',\n 'returnGeometry': 'returnGeometry',\n 'maxAllowableOffset': 'maxAllowableOffset',\n 'precision': 'geometryPrecision',\n 'dynamicLayers': 'dynamicLayers',\n 'returnZ': 'returnZ',\n 'returnM': 'returnM',\n 'gdbVersion': 'gdbVersion',\n 'token': 'token'\n },\n\n path: 'find',\n\n params: {\n sr: 4326,\n contains: true,\n returnGeometry: true,\n returnZ: true,\n returnM: false\n },\n\n layerDefs: function (id, where) {\n this.params.layerDefs = (this.params.layerDefs) ? this.params.layerDefs + ';' : '';\n this.params.layerDefs += ([id, where]).join(':');\n return this;\n },\n\n simplify: function (map, factor) {\n var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());\n this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * factor;\n return this;\n },\n\n run: function (callback, context) {\n return this.request(function (error, response) {\n callback.call(context, error, (response && Util.responseToFeatureCollection(response)), response);\n }, context);\n }\n});\n\nexport function find (options) {\n return new Find(options);\n}\n\nexport default find;\n","import { Task } from './Task';\n\nexport var Identify = Task.extend({\n path: 'identify',\n\n between: function (start, end) {\n this.params.time = [start.valueOf(), end.valueOf()];\n return this;\n }\n});\n\nexport function identify (options) {\n return new Identify(options);\n}\n\nexport default identify;\n","import L from 'leaflet';\nimport { Identify } from './Identify';\nimport Util from '../Util';\n\nexport var IdentifyFeatures = Identify.extend({\n setters: {\n 'layers': 'layers',\n 'precision': 'geometryPrecision',\n 'tolerance': 'tolerance',\n 'returnGeometry': 'returnGeometry'\n },\n\n params: {\n sr: 4326,\n layers: 'all',\n tolerance: 3,\n returnGeometry: true\n },\n\n on: function (map) {\n var extent = Util.boundsToExtent(map.getBounds());\n var size = map.getSize();\n this.params.imageDisplay = [size.x, size.y, 96];\n this.params.mapExtent = [extent.xmin, extent.ymin, extent.xmax, extent.ymax];\n return this;\n },\n\n at: function (latlng) {\n latlng = L.latLng(latlng);\n this.params.geometry = [latlng.lng, latlng.lat];\n this.params.geometryType = 'esriGeometryPoint';\n return this;\n },\n\n layerDef: function (id, where) {\n this.params.layerDefs = (this.params.layerDefs) ? this.params.layerDefs + ';' : '';\n this.params.layerDefs += ([id, where]).join(':');\n return this;\n },\n\n simplify: function (map, factor) {\n var mapWidth = Math.abs(map.getBounds().getWest() - map.getBounds().getEast());\n this.params.maxAllowableOffset = (mapWidth / map.getSize().y) * (1 - factor);\n return this;\n },\n\n run: function (callback, context) {\n return this.request(function (error, response) {\n // immediately invoke with an error\n if (error) {\n callback.call(context, error, undefined, response);\n return;\n\n // ok no error lets just assume we have features...\n } else {\n var featureCollection = Util.responseToFeatureCollection(response);\n response.results = response.results.reverse();\n for (var i = 0; i < featureCollection.features.length; i++) {\n var feature = featureCollection.features[i];\n feature.layerId = response.results[i].layerId;\n }\n callback.call(context, undefined, featureCollection, response);\n }\n });\n }\n});\n\nexport function identifyFeatures (options) {\n return new IdentifyFeatures(options);\n}\n\nexport default identifyFeatures;\n","import L from 'leaflet';\nimport { Identify } from './Identify';\nimport Util from '../Util';\n\nexport var IdentifyImage = Identify.extend({\n setters: {\n 'setMosaicRule': 'mosaicRule',\n 'setRenderingRule': 'renderingRule',\n 'setPixelSize': 'pixelSize',\n 'returnCatalogItems': 'returnCatalogItems',\n 'returnGeometry': 'returnGeometry'\n },\n\n params: {\n returnGeometry: false\n },\n\n at: function (latlng) {\n latlng = L.latLng(latlng);\n this.params.geometry = JSON.stringify({\n x: latlng.lng,\n y: latlng.lat,\n spatialReference: {\n wkid: 4326\n }\n });\n this.params.geometryType = 'esriGeometryPoint';\n return this;\n },\n\n getMosaicRule: function () {\n return this.params.mosaicRule;\n },\n\n getRenderingRule: function () {\n return this.params.renderingRule;\n },\n\n getPixelSize: function () {\n return this.params.pixelSize;\n },\n\n run: function (callback, context) {\n return this.request(function (error, response) {\n callback.call(context, error, (response && this._responseToGeoJSON(response)), response);\n }, this);\n },\n\n // get pixel data and return as geoJSON point\n // populate catalog items (if any)\n // merging in any catalogItemVisibilities as a propery of each feature\n _responseToGeoJSON: function (response) {\n var location = response.location;\n var catalogItems = response.catalogItems;\n var catalogItemVisibilities = response.catalogItemVisibilities;\n var geoJSON = {\n 'pixel': {\n 'type': 'Feature',\n 'geometry': {\n 'type': 'Point',\n 'coordinates': [location.x, location.y]\n },\n 'crs': {\n 'type': 'EPSG',\n 'properties': {\n 'code': location.spatialReference.wkid\n }\n },\n 'properties': {\n 'OBJECTID': response.objectId,\n 'name': response.name,\n 'value': response.value\n },\n 'id': response.objectId\n }\n };\n\n if (response.properties && response.properties.Values) {\n geoJSON.pixel.properties.values = response.properties.Values;\n }\n\n if (catalogItems && catalogItems.features) {\n geoJSON.catalogItems = Util.responseToFeatureCollection(catalogItems);\n if (catalogItemVisibilities && catalogItemVisibilities.length === geoJSON.catalogItems.features.length) {\n for (var i = catalogItemVisibilities.length - 1; i >= 0; i--) {\n geoJSON.catalogItems.features[i].properties.catalogItemVisibility = catalogItemVisibilities[i];\n }\n }\n }\n return geoJSON;\n }\n\n});\n\nexport function identifyImage (params) {\n return new IdentifyImage(params);\n}\n\nexport default identifyImage;\n","import L from 'leaflet';\nimport {cors} from '../Support';\nimport {cleanUrl} from '../Util';\nimport Request from '../Request';\n\nexport var Service = L.Evented.extend({\n\n options: {\n proxy: false,\n useCors: cors,\n timeout: 0\n },\n\n initialize: function (options) {\n options = options || {};\n this._requestQueue = [];\n this._authenticating = false;\n L.Util.setOptions(this, options);\n this.options.url = cleanUrl(this.options.url);\n },\n\n get: function (path, params, callback, context) {\n return this._request('get', path, params, callback, context);\n },\n\n post: function (path, params, callback, context) {\n return this._request('post', path, params, callback, context);\n },\n\n request: function (path, params, callback, context) {\n return this._request('request', path, params, callback, context);\n },\n\n metadata: function (callback, context) {\n return this._request('get', '', {}, callback, context);\n },\n\n authenticate: function (token) {\n this._authenticating = false;\n this.options.token = token;\n this._runQueue();\n return this;\n },\n\n getTimeout: function () {\n return this.options.timeout;\n },\n\n setTimeout: function (timeout) {\n this.options.timeout = timeout;\n },\n\n _request: function (method, path, params, callback, context) {\n this.fire('requeststart', {\n url: this.options.url + path,\n params: params,\n method: method\n }, true);\n\n var wrappedCallback = this._createServiceCallback(method, path, params, callback, context);\n\n if (this.options.token) {\n params.token = this.options.token;\n }\n\n if (this._authenticating) {\n this._requestQueue.push([method, path, params, callback, context]);\n return;\n } else {\n var url = (this.options.proxy) ? this.options.proxy + '?' + this.options.url + path : this.options.url + path;\n\n if ((method === 'get' || method === 'request') && !this.options.useCors) {\n return Request.get.JSONP(url, params, wrappedCallback, context);\n } else {\n return Request[method](url, params, wrappedCallback, context);\n }\n }\n },\n\n _createServiceCallback: function (method, path, params, callback, context) {\n return L.Util.bind(function (error, response) {\n if (error && (error.code === 499 || error.code === 498)) {\n this._authenticating = true;\n\n this._requestQueue.push([method, path, params, callback, context]);\n\n // fire an event for users to handle and re-authenticate\n this.fire('authenticationrequired', {\n authenticate: L.Util.bind(this.authenticate, this)\n }, true);\n\n // if the user has access to a callback they can handle the auth error\n error.authenticate = L.Util.bind(this.authenticate, this);\n }\n\n callback.call(context, error, response);\n\n if (error) {\n this.fire('requesterror', {\n url: this.options.url + path,\n params: params,\n message: error.message,\n code: error.code,\n method: method\n }, true);\n } else {\n this.fire('requestsuccess', {\n url: this.options.url + path,\n params: params,\n response: response,\n method: method\n }, true);\n }\n\n this.fire('requestend', {\n url: this.options.url + path,\n params: params,\n method: method\n }, true);\n }, this);\n },\n\n _runQueue: function () {\n for (var i = this._requestQueue.length - 1; i >= 0; i--) {\n var request = this._requestQueue[i];\n var method = request.shift();\n this[method].apply(this, request);\n }\n this._requestQueue = [];\n }\n});\n\nexport function service (options) {\n return new Service(options);\n}\n\nexport default service;\n","import { Service } from './Service';\nimport identifyFeatures from '../Tasks/IdentifyFeatures';\nimport query from '../Tasks/Query';\nimport find from '../Tasks/Find';\n\nexport var MapService = Service.extend({\n\n identify: function () {\n return identifyFeatures(this);\n },\n\n find: function () {\n return find(this);\n },\n\n query: function () {\n return query(this);\n }\n\n});\n\nexport function mapService (options) {\n return new MapService(options);\n}\n\nexport default mapService;\n","import { Service } from './Service';\nimport identifyImage from '../Tasks/IdentifyImage';\nimport query from '../Tasks/Query';\n\nexport var ImageService = Service.extend({\n\n query: function () {\n return query(this);\n },\n\n identify: function () {\n return identifyImage(this);\n }\n});\n\nexport function imageService (options) {\n return new ImageService(options);\n}\n\nexport default imageService;\n","import { Service } from './Service';\nimport query from '../Tasks/Query';\nimport { geojsonToArcGIS } from '../Util';\n\nexport var FeatureLayerService = Service.extend({\n\n options: {\n idAttribute: 'OBJECTID'\n },\n\n query: function () {\n return query(this);\n },\n\n addFeature: function (feature, callback, context) {\n delete feature.id;\n\n feature = geojsonToArcGIS(feature);\n\n return this.post('addFeatures', {\n features: [feature]\n }, function (error, response) {\n var result = (response && response.addResults) ? response.addResults[0] : undefined;\n if (callback) {\n callback.call(context, error || response.addResults[0].error, result);\n }\n }, context);\n },\n\n updateFeature: function (feature, callback, context) {\n feature = geojsonToArcGIS(feature, this.options.idAttribute);\n\n return this.post('updateFeatures', {\n features: [feature]\n }, function (error, response) {\n var result = (response && response.updateResults) ? response.updateResults[0] : undefined;\n if (callback) {\n callback.call(context, error || response.updateResults[0].error, result);\n }\n }, context);\n },\n\n deleteFeature: function (id, callback, context) {\n return this.post('deleteFeatures', {\n objectIds: id\n }, function (error, response) {\n var result = (response && response.deleteResults) ? response.deleteResults[0] : undefined;\n if (callback) {\n callback.call(context, error || response.deleteResults[0].error, result);\n }\n }, context);\n },\n\n deleteFeatures: function (ids, callback, context) {\n return this.post('deleteFeatures', {\n objectIds: ids\n }, function (error, response) {\n // pass back the entire array\n var result = (response && response.deleteResults) ? response.deleteResults : undefined;\n if (callback) {\n callback.call(context, error || response.deleteResults[0].error, result);\n }\n }, context);\n }\n});\n\nexport function featureLayerService (options) {\n return new FeatureLayerService(options);\n}\n\nexport default featureLayerService;\n","import L from 'leaflet';\n\nexport var Logo = L.Control.extend({\n options: {\n position: 'bottomright',\n marginTop: 0,\n marginLeft: 0,\n marginBottom: 0,\n marginRight: 0\n },\n\n onAdd: function () {\n var div = L.DomUtil.create('div', 'esri-leaflet-logo');\n div.style.marginTop = this.options.marginTop;\n div.style.marginLeft = this.options.marginLeft;\n div.style.marginBottom = this.options.marginBottom;\n div.style.marginRight = this.options.marginRight;\n div.innerHTML = '';\n\n return div;\n }\n});\n\nexport default function logo (options) {\n return new Logo(options);\n}\n","import L from 'leaflet';\nimport logo from '../Controls/Logo';\nimport { jsonp } from '../Request';\nimport { pointerEvents } from '../Support';\n\nvar tileProtocol = (window.location.protocol !== 'https:') ? 'http:' : 'https:';\n\nexport var BasemapLayer = L.TileLayer.extend({\n statics: {\n TILES: {\n Streets: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',\n attributionUrl: 'https://static.arcgis.com/attribution/World_Street_Map',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n attribution: 'Esri'\n }\n },\n Topographic: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}',\n attributionUrl: 'https://static.arcgis.com/attribution/World_Topo_Map',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n attribution: 'Esri'\n }\n },\n Oceans: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}',\n attributionUrl: 'https://static.arcgis.com/attribution/Ocean_Basemap',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n attribution: 'Esri'\n }\n },\n OceansLabels: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: true,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane'\n }\n },\n NationalGeographic: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n attribution: 'National Geographic, Esri, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp.'\n }\n },\n DarkGray: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n attribution: 'Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors'\n }\n },\n DarkGrayLabels: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: true,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane'\n\n }\n },\n Gray: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n attribution: 'Esri, HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors'\n }\n },\n GrayLabels: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: true,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane'\n }\n },\n Imagery: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n attribution: 'Esri, DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community'\n }\n },\n ImageryLabels: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: true,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane'\n }\n },\n ImageryTransportation: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: true,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane'\n }\n },\n ShadedRelief: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 13,\n subdomains: ['server', 'services'],\n attribution: 'Esri, USGS'\n }\n },\n ShadedReliefLabels: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: true,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 12,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane'\n }\n },\n Terrain: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: false,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 13,\n subdomains: ['server', 'services'],\n attribution: 'Esri, USGS, NOAA'\n }\n },\n TerrainLabels: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}',\n options: {\n hideLogo: true,\n logoPosition: 'bottomright',\n minZoom: 1,\n maxZoom: 13,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane'\n }\n }\n }\n },\n initialize: function (key, options) {\n var config;\n\n // set the config variable with the appropriate config object\n if (typeof key === 'object' && key.urlTemplate && key.options) {\n config = key;\n } else if (typeof key === 'string' && BasemapLayer.TILES[key]) {\n config = BasemapLayer.TILES[key];\n } else {\n throw new Error('L.esri.BasemapLayer: Invalid parameter. Use one of \"Streets\", \"Topographic\", \"Oceans\", \"OceansLabels\", \"NationalGeographic\", \"Gray\", \"GrayLabels\", \"DarkGray\", \"DarkGrayLabels\", \"Imagery\", \"ImageryLabels\", \"ImageryTransportation\", \"ShadedRelief\", \"ShadedReliefLabels\", \"Terrain\" or \"TerrainLabels\"');\n }\n\n // merge passed options into the config options\n var tileOptions = L.Util.extend(config.options, options);\n\n L.Util.setOptions(this, tileOptions);\n\n // call the initialize method on L.TileLayer to set everything up\n L.TileLayer.prototype.initialize.call(this, config.urlTemplate, tileOptions);\n\n // if this basemap requires dynamic attribution set it up\n if (config.attributionUrl) {\n this._getAttributionData(config.attributionUrl);\n }\n\n this._logo = logo({\n position: this.options.logoPosition\n });\n },\n\n onAdd: function (map) {\n if (!this.options.hideLogo && !map._hasEsriLogo) {\n this._logo.addTo(map);\n map._hasEsriLogo = true;\n }\n\n if (this.options.pane === 'esri-labels') {\n this._initPane();\n }\n\n map.on('moveend', this._updateMapAttribution, this);\n\n L.TileLayer.prototype.onAdd.call(this, map);\n },\n\n onRemove: function (map) {\n // check to make sure the logo hasn't already been removed\n if (this._logo && this._logo._container) {\n map.removeControl(this._logo);\n map._hasEsriLogo = false;\n }\n\n map.off('moveend', this._updateMapAttribution, this);\n\n L.TileLayer.prototype.onRemove.call(this, map);\n },\n\n getAttribution: function () {\n if (this.options.attribution) {\n var attribution = '' + this.options.attribution + '';\n }\n return attribution;\n },\n\n _initPane: function () {\n if (!this._map.getPane(this.options.pane)) {\n var pane = this._map.createPane(this.options.pane);\n pane.style.pointerEvents = 'none';\n pane.style.zIndex = 500;\n }\n },\n\n _getAttributionData: function (url) {\n jsonp(url, {}, L.Util.bind(function (error, attributions) {\n if (error) { return; }\n this._attributions = [];\n\n for (var c = 0; c < attributions.contributors.length; c++) {\n var contributor = attributions.contributors[c];\n for (var i = 0; i < contributor.coverageAreas.length; i++) {\n var coverageArea = contributor.coverageAreas[i];\n var southWest = L.latLng(coverageArea.bbox[0], coverageArea.bbox[1]);\n var northEast = L.latLng(coverageArea.bbox[2], coverageArea.bbox[3]);\n this._attributions.push({\n attribution: contributor.attribution,\n score: coverageArea.score,\n bounds: L.latLngBounds(southWest, northEast),\n minZoom: coverageArea.zoomMin,\n maxZoom: coverageArea.zoomMax\n });\n }\n }\n\n this._attributions.sort(function (a, b) {\n return b.score - a.score;\n });\n\n this._updateMapAttribution();\n }, this));\n },\n\n _updateMapAttribution: function () {\n if (this._map && this._map.attributionControl && this._attributions) {\n var newAttributions = '';\n var bounds = this._map.getBounds();\n var zoom = this._map.getZoom();\n\n for (var i = 0; i < this._attributions.length; i++) {\n var attribution = this._attributions[i];\n var text = attribution.attribution;\n if (!newAttributions.match(text) && bounds.intersects(attribution.bounds) && zoom >= attribution.minZoom && zoom <= attribution.maxZoom) {\n newAttributions += (', ' + text);\n }\n }\n newAttributions = newAttributions.substr(2);\n var attributionElement = this._map.attributionControl._container.querySelector('.esri-attributions');\n\n attributionElement.innerHTML = newAttributions;\n attributionElement.style.maxWidth = (this._map.getSize().x * 0.65) + 'px';\n\n this.fire('attributionupdated', {\n attribution: newAttributions\n });\n }\n }\n});\n\nexport function basemapLayer (key, options) {\n return new BasemapLayer(key, options);\n}\n\nexport default basemapLayer;\n","import L from 'leaflet';\nimport {warn, cleanUrl} from '../Util';\nimport mapService from '../Services/MapService';\n\nexport var TiledMapLayer = L.TileLayer.extend({\n options: {\n zoomOffsetAllowance: 0.1\n },\n\n statics: {\n MercatorZoomLevels: {\n '0': 156543.03392799999,\n '1': 78271.516963999893,\n '2': 39135.758482000099,\n '3': 19567.879240999901,\n '4': 9783.9396204999593,\n '5': 4891.9698102499797,\n '6': 2445.9849051249898,\n '7': 1222.9924525624899,\n '8': 611.49622628138002,\n '9': 305.74811314055802,\n '10': 152.874056570411,\n '11': 76.437028285073197,\n '12': 38.218514142536598,\n '13': 19.109257071268299,\n '14': 9.5546285356341496,\n '15': 4.7773142679493699,\n '16': 2.38865713397468,\n '17': 1.1943285668550501,\n '18': 0.59716428355981699,\n '19': 0.29858214164761698,\n '20': 0.14929107082381,\n '21': 0.07464553541191,\n '22': 0.0373227677059525,\n '23': 0.0186613838529763\n }\n },\n\n initialize: function (options) {\n options.url = cleanUrl(options.url);\n options = L.Util.setOptions(this, options);\n\n // set the urls\n this.tileUrl = options.url + 'tile/{z}/{y}/{x}';\n this.service = mapService(options);\n this.service.addEventParent(this);\n\n var arcgisonline = new RegExp(/tiles.arcgis(online)?\\.com/g);\n if (arcgisonline.test(options.url)) {\n this.tileUrl = this.tileUrl.replace('://tiles', '://tiles{s}');\n options.subdomains = ['1', '2', '3', '4'];\n }\n\n if (this.options.token) {\n this.tileUrl += ('?token=' + this.options.token);\n }\n\n // init layer by calling TileLayers initialize method\n L.TileLayer.prototype.initialize.call(this, this.tileUrl, options);\n },\n\n getTileUrl: function (tilePoint) {\n return L.Util.template(this.tileUrl, L.extend({\n s: this._getSubdomain(tilePoint),\n z: (this._lodMap && this._lodMap[tilePoint.z]) ? this._lodMap[tilePoint.z] : tilePoint.z, // try lod map first, then just defualt to zoom level\n x: tilePoint.x,\n y: tilePoint.y\n }, this.options));\n },\n\n createTile: function (coords, done) {\n var tile = document.createElement('img');\n\n L.DomEvent.on(tile, 'load', L.bind(this._tileOnLoad, this, done, tile));\n L.DomEvent.on(tile, 'error', L.bind(this._tileOnError, this, done, tile));\n\n if (this.options.crossOrigin) {\n tile.crossOrigin = '';\n }\n\n /*\n Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons\n http://www.w3.org/TR/WCAG20-TECHS/H67\n */\n tile.alt = '';\n\n // if there is no lod map or an lod map with a proper zoom load the tile\n // otherwise wait for the lod map to become available\n if (!this._lodMap || (this._lodMap && this._lodMap[coords.z])) {\n tile.src = this.getTileUrl(coords);\n } else {\n this.once('lodmap', function () {\n tile.src = this.getTileUrl(coords);\n }, this);\n }\n\n return tile;\n },\n\n onAdd: function (map) {\n if (map.options.crs === L.CRS.EPSG3857 && !this._lodMap) {\n this._lodMap = {};\n this.metadata(function (error, metadata) {\n if (!error) {\n var sr = metadata.spatialReference.latestWkid || metadata.spatialReference.wkid;\n if (sr === 102100 || sr === 3857) {\n // create the zoom level data\n var arcgisLODs = metadata.tileInfo.lods;\n var correctResolutions = TiledMapLayer.MercatorZoomLevels;\n\n for (var i = 0; i < arcgisLODs.length; i++) {\n var arcgisLOD = arcgisLODs[i];\n for (var ci in correctResolutions) {\n var correctRes = correctResolutions[ci];\n\n if (this._withinPercentage(arcgisLOD.resolution, correctRes, this.options.zoomOffsetAllowance)) {\n this._lodMap[ci] = arcgisLOD.level;\n break;\n }\n }\n }\n\n this.fire('lodmap');\n } else {\n warn('L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet http://esri.github.io/esri-leaflet/examples/non-mercator-projection.html');\n }\n }\n }, this);\n }\n\n L.TileLayer.prototype.onAdd.call(this, map);\n },\n\n metadata: function (callback, context) {\n this.service.metadata(callback, context);\n return this;\n },\n\n identify: function () {\n return this.service.identify();\n },\n\n find: function () {\n return this.service.find();\n },\n\n query: function () {\n return this.service.query();\n },\n\n authenticate: function (token) {\n var tokenQs = '?token=' + token;\n this.tileUrl = (this.options.token) ? this.tileUrl.replace(/\\?token=(.+)/g, tokenQs) : this.tileUrl + tokenQs;\n this.options.token = token;\n this.service.authenticate(token);\n return this;\n },\n\n _withinPercentage: function (a, b, percentage) {\n var diff = Math.abs((a / b) - 1);\n return diff < percentage;\n }\n});\n\nexport function tiledMapLayer (url, options) {\n return new TiledMapLayer(url, options);\n}\n\nexport default tiledMapLayer;\n","import L from 'leaflet';\nimport {cors} from '../Support';\n\nvar Overlay = L.ImageOverlay.extend({\n onAdd: function (map) {\n this._topLeft = map.getPixelBounds().min;\n L.ImageOverlay.prototype.onAdd.call(this, map);\n },\n _reset: function () {\n if (this._map.options.crs === L.CRS.EPSG3857) {\n L.ImageOverlay.prototype._reset.call(this);\n } else {\n L.DomUtil.setPosition(this._image, this._topLeft.subtract(this._map.getPixelOrigin()));\n }\n }\n});\n\nexport var RasterLayer = L.Layer.extend({\n\n options: {\n opacity: 1,\n position: 'front',\n f: 'image',\n useCors: cors,\n attribution: null,\n interactive: false,\n alt: ''\n },\n\n onAdd: function (map) {\n this._update = L.Util.throttle(this._update, this.options.updateInterval, this);\n\n map.on('moveend', this._update, this);\n\n // if we had an image loaded and it matches the\n // current bounds show the image otherwise remove it\n if (this._currentImage && this._currentImage._bounds.equals(this._map.getBounds())) {\n map.addLayer(this._currentImage);\n } else if (this._currentImage) {\n this._map.removeLayer(this._currentImage);\n this._currentImage = null;\n }\n\n this._update();\n\n if (this._popup) {\n this._map.on('click', this._getPopupData, this);\n this._map.on('dblclick', this._resetPopupState, this);\n }\n },\n\n onRemove: function (map) {\n if (this._currentImage) {\n this._map.removeLayer(this._currentImage);\n }\n\n if (this._popup) {\n this._map.off('click', this._getPopupData, this);\n this._map.off('dblclick', this._resetPopupState, this);\n }\n\n this._map.off('moveend', this._update, this);\n },\n\n bindPopup: function (fn, popupOptions) {\n this._shouldRenderPopup = false;\n this._lastClick = false;\n this._popup = L.popup(popupOptions);\n this._popupFunction = fn;\n if (this._map) {\n this._map.on('click', this._getPopupData, this);\n this._map.on('dblclick', this._resetPopupState, this);\n }\n return this;\n },\n\n unbindPopup: function () {\n if (this._map) {\n this._map.closePopup(this._popup);\n this._map.off('click', this._getPopupData, this);\n this._map.off('dblclick', this._resetPopupState, this);\n }\n this._popup = false;\n return this;\n },\n\n bringToFront: function () {\n this.options.position = 'front';\n if (this._currentImage) {\n this._currentImage.bringToFront();\n }\n return this;\n },\n\n bringToBack: function () {\n this.options.position = 'back';\n if (this._currentImage) {\n this._currentImage.bringToBack();\n }\n return this;\n },\n\n getAttribution: function () {\n return this.options.attribution;\n },\n\n getOpacity: function () {\n return this.options.opacity;\n },\n\n setOpacity: function (opacity) {\n this.options.opacity = opacity;\n this._currentImage.setOpacity(opacity);\n return this;\n },\n\n getTimeRange: function () {\n return [this.options.from, this.options.to];\n },\n\n setTimeRange: function (from, to) {\n this.options.from = from;\n this.options.to = to;\n this._update();\n return this;\n },\n\n metadata: function (callback, context) {\n this.service.metadata(callback, context);\n return this;\n },\n\n authenticate: function (token) {\n this.service.authenticate(token);\n return this;\n },\n\n _renderImage: function (url, bounds) {\n if (this._map) {\n // create a new image overlay and add it to the map\n // to start loading the image\n // opacity is 0 while the image is loading\n var image = new Overlay(url, bounds, {\n opacity: 0,\n crossOrigin: this.options.useCors,\n alt: this.options.alt,\n pane: this.options.pane || this.getPane(),\n interactive: this.options.interactive\n }).addTo(this._map);\n\n // once the image loads\n image.once('load', function (e) {\n if (this._map) {\n var newImage = e.target;\n var oldImage = this._currentImage;\n\n // if the bounds of this image matches the bounds that\n // _renderImage was called with and we have a map with the same bounds\n // hide the old image if there is one and set the opacity\n // of the new image otherwise remove the new image\n if (newImage._bounds.equals(bounds) && newImage._bounds.equals(this._map.getBounds())) {\n this._currentImage = newImage;\n\n if (this.options.position === 'front') {\n this.bringToFront();\n } else {\n this.bringToBack();\n }\n\n if (this._map && this._currentImage._map) {\n this._currentImage.setOpacity(this.options.opacity);\n } else {\n this._currentImage._map.removeLayer(this._currentImage);\n }\n\n if (oldImage && this._map) {\n this._map.removeLayer(oldImage);\n }\n\n if (oldImage && oldImage._map) {\n oldImage._map.removeLayer(oldImage);\n }\n } else {\n this._map.removeLayer(newImage);\n }\n }\n\n this.fire('load', {\n bounds: bounds\n });\n }, this);\n\n this.fire('loading', {\n bounds: bounds\n });\n }\n },\n\n _update: function () {\n if (!this._map) {\n return;\n }\n\n var zoom = this._map.getZoom();\n var bounds = this._map.getBounds();\n\n if (this._animatingZoom) {\n return;\n }\n\n if (this._map._panTransition && this._map._panTransition._inProgress) {\n return;\n }\n\n if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {\n this._currentImage._map.removeLayer(this._currentImage);\n return;\n }\n\n var params = this._buildExportParams();\n\n this._requestExport(params, bounds);\n },\n\n _renderPopup: function (latlng, error, results, response) {\n latlng = L.latLng(latlng);\n if (this._shouldRenderPopup && this._lastClick.equals(latlng)) {\n // add the popup to the map where the mouse was clicked at\n var content = this._popupFunction(error, results, response);\n if (content) {\n this._popup.setLatLng(latlng).setContent(content).openOn(this._map);\n }\n }\n },\n\n _resetPopupState: function (e) {\n this._shouldRenderPopup = false;\n this._lastClick = e.latlng;\n }\n});\n","import L from 'leaflet';\nimport { RasterLayer } from './RasterLayer';\nimport { cleanUrl } from '../Util';\nimport imageService from '../Services/ImageService';\n\nexport var ImageMapLayer = RasterLayer.extend({\n\n options: {\n updateInterval: 150,\n format: 'jpgpng',\n transparent: true,\n f: 'json'\n },\n\n query: function () {\n return this.service.query();\n },\n\n identify: function () {\n return this.service.identify();\n },\n\n initialize: function (options) {\n options.url = cleanUrl(options.url);\n this.service = imageService(options);\n this.service.addEventParent(this);\n\n L.Util.setOptions(this, options);\n },\n\n setPixelType: function (pixelType) {\n this.options.pixelType = pixelType;\n this._update();\n return this;\n },\n\n getPixelType: function () {\n return this.options.pixelType;\n },\n\n setBandIds: function (bandIds) {\n if (L.Util.isArray(bandIds)) {\n this.options.bandIds = bandIds.join(',');\n } else {\n this.options.bandIds = bandIds.toString();\n }\n this._update();\n return this;\n },\n\n getBandIds: function () {\n return this.options.bandIds;\n },\n\n setNoData: function (noData, noDataInterpretation) {\n if (L.Util.isArray(noData)) {\n this.options.noData = noData.join(',');\n } else {\n this.options.noData = noData.toString();\n }\n if (noDataInterpretation) {\n this.options.noDataInterpretation = noDataInterpretation;\n }\n this._update();\n return this;\n },\n\n getNoData: function () {\n return this.options.noData;\n },\n\n getNoDataInterpretation: function () {\n return this.options.noDataInterpretation;\n },\n\n setRenderingRule: function (renderingRule) {\n this.options.renderingRule = renderingRule;\n this._update();\n },\n\n getRenderingRule: function () {\n return this.options.renderingRule;\n },\n\n setMosaicRule: function (mosaicRule) {\n this.options.mosaicRule = mosaicRule;\n this._update();\n },\n\n getMosaicRule: function () {\n return this.options.mosaicRule;\n },\n\n _getPopupData: function (e) {\n var callback = L.Util.bind(function (error, results, response) {\n if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire\n setTimeout(L.Util.bind(function () {\n this._renderPopup(e.latlng, error, results, response);\n }, this), 300);\n }, this);\n\n var identifyRequest = this.identify().at(e.latlng);\n\n // set mosaic rule for identify task if it is set for layer\n if (this.options.mosaicRule) {\n identifyRequest.setMosaicRule(this.options.mosaicRule);\n // @TODO: force return catalog items too?\n }\n\n // @TODO: set rendering rule? Not sure,\n // sometimes you want raw pixel values\n // if (this.options.renderingRule) {\n // identifyRequest.setRenderingRule(this.options.renderingRule);\n // }\n\n identifyRequest.run(callback);\n\n // set the flags to show the popup\n this._shouldRenderPopup = true;\n this._lastClick = e.latlng;\n },\n\n _buildExportParams: function () {\n var bounds = this._map.getBounds();\n var size = this._map.getSize();\n var ne = this._map.options.crs.project(bounds._northEast);\n var sw = this._map.options.crs.project(bounds._southWest);\n var sr = parseInt(this._map.options.crs.code.split(':')[1], 10);\n\n var params = {\n bbox: [sw.x, sw.y, ne.x, ne.y].join(','),\n size: size.x + ',' + size.y,\n format: this.options.format,\n transparent: this.options.transparent,\n bboxSR: sr,\n imageSR: sr\n };\n\n if (this.options.from && this.options.to) {\n params.time = this.options.from.valueOf() + ',' + this.options.to.valueOf();\n }\n\n if (this.options.pixelType) {\n params.pixelType = this.options.pixelType;\n }\n\n if (this.options.interpolation) {\n params.interpolation = this.options.interpolation;\n }\n\n if (this.options.compressionQuality) {\n params.compressionQuality = this.options.compressionQuality;\n }\n\n if (this.options.bandIds) {\n params.bandIds = this.options.bandIds;\n }\n\n if (this.options.noData) {\n params.noData = this.options.noData;\n }\n\n if (this.options.noDataInterpretation) {\n params.noDataInterpretation = this.options.noDataInterpretation;\n }\n\n if (this.service.options.token) {\n params.token = this.service.options.token;\n }\n\n if (this.options.renderingRule) {\n params.renderingRule = JSON.stringify(this.options.renderingRule);\n }\n\n if (this.options.mosaicRule) {\n params.mosaicRule = JSON.stringify(this.options.mosaicRule);\n }\n\n return params;\n },\n\n _requestExport: function (params, bounds) {\n if (this.options.f === 'json') {\n this.service.request('exportImage', params, function (error, response) {\n if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire\n this._renderImage(response.href, bounds);\n }, this);\n } else {\n params.f = 'image';\n this._renderImage(this.options.url + 'exportImage' + L.Util.getParamString(params), bounds);\n }\n }\n});\n\nexport function imageMapLayer (url, options) {\n return new ImageMapLayer(url, options);\n}\n\nexport default imageMapLayer;\n","import L from 'leaflet';\nimport { RasterLayer } from './RasterLayer';\nimport { cleanUrl } from '../Util';\nimport mapService from '../Services/MapService';\n\nexport var DynamicMapLayer = RasterLayer.extend({\n\n options: {\n updateInterval: 150,\n layers: false,\n layerDefs: false,\n timeOptions: false,\n format: 'png24',\n transparent: true,\n f: 'json'\n },\n\n initialize: function (options) {\n options.url = cleanUrl(options.url);\n this.service = mapService(options);\n this.service.addEventParent(this);\n\n if ((options.proxy || options.token) && options.f !== 'json') {\n options.f = 'json';\n }\n L.Util.setOptions(this, options);\n },\n\n getDynamicLayers: function () {\n return this.options.dynamicLayers;\n },\n\n setDynamicLayers: function (dynamicLayers) {\n this.options.dynamicLayers = dynamicLayers;\n this._update();\n return this;\n },\n\n getLayers: function () {\n return this.options.layers;\n },\n\n setLayers: function (layers) {\n this.options.layers = layers;\n this._update();\n return this;\n },\n\n getLayerDefs: function () {\n return this.options.layerDefs;\n },\n\n setLayerDefs: function (layerDefs) {\n this.options.layerDefs = layerDefs;\n this._update();\n return this;\n },\n\n getTimeOptions: function () {\n return this.options.timeOptions;\n },\n\n setTimeOptions: function (timeOptions) {\n this.options.timeOptions = timeOptions;\n this._update();\n return this;\n },\n\n query: function () {\n return this.service.query();\n },\n\n identify: function () {\n return this.service.identify();\n },\n\n find: function () {\n return this.service.find();\n },\n\n _getPopupData: function (e) {\n var callback = L.Util.bind(function (error, featureCollection, response) {\n if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire\n setTimeout(L.Util.bind(function () {\n this._renderPopup(e.latlng, error, featureCollection, response);\n }, this), 300);\n }, this);\n\n var identifyRequest = this.identify().on(this._map).at(e.latlng);\n\n if (this.options.layers) {\n identifyRequest.layers('visible:' + this.options.layers.join(','));\n } else {\n identifyRequest.layers('visible');\n }\n\n identifyRequest.run(callback);\n\n // set the flags to show the popup\n this._shouldRenderPopup = true;\n this._lastClick = e.latlng;\n },\n\n _buildExportParams: function () {\n var bounds = this._map.getBounds();\n var size = this._map.getSize();\n var ne = this._map.options.crs.project(bounds.getNorthEast());\n var sw = this._map.options.crs.project(bounds.getSouthWest());\n var sr = parseInt(this._map.options.crs.code.split(':')[1], 10);\n\n // ensure that we don't ask ArcGIS Server for a taller image than we have actual map displaying\n var top = this._map.latLngToLayerPoint(bounds._northEast);\n var bottom = this._map.latLngToLayerPoint(bounds._southWest);\n\n if (top.y > 0 || bottom.y < size.y) {\n size.y = bottom.y - top.y;\n }\n\n var params = {\n bbox: [sw.x, sw.y, ne.x, ne.y].join(','),\n size: size.x + ',' + size.y,\n dpi: 96,\n format: this.options.format,\n transparent: this.options.transparent,\n bboxSR: sr,\n imageSR: sr\n };\n\n if (this.options.dynamicLayers) {\n params.dynamicLayers = this.options.dynamicLayers;\n }\n\n if (this.options.layers) {\n params.layers = 'show:' + this.options.layers.join(',');\n }\n\n if (this.options.layerDefs) {\n params.layerDefs = JSON.stringify(this.options.layerDefs);\n }\n\n if (this.options.timeOptions) {\n params.timeOptions = JSON.stringify(this.options.timeOptions);\n }\n\n if (this.options.from && this.options.to) {\n params.time = this.options.from.valueOf() + ',' + this.options.to.valueOf();\n }\n\n if (this.service.options.token) {\n params.token = this.service.options.token;\n }\n\n return params;\n },\n\n _requestExport: function (params, bounds) {\n if (this.options.f === 'json') {\n this.service.request('export', params, function (error, response) {\n if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire\n this._renderImage(response.href, bounds);\n }, this);\n } else {\n params.f = 'image';\n this._renderImage(this.options.url + 'export' + L.Util.getParamString(params), bounds);\n }\n }\n});\n\nexport function dynamicMapLayer (url, options) {\n return new DynamicMapLayer(url, options);\n}\n\nexport default dynamicMapLayer;\n","import L from 'leaflet';\n\nvar VirtualGrid = L.Layer.extend({\n\n options: {\n cellSize: 512,\n updateInterval: 150\n },\n\n initialize: function (options) {\n options = L.setOptions(this, options);\n this._ok = true;\n },\n\n onAdd: function (map) {\n this._map = map;\n this._update = L.Util.throttle(this._update, this.options.updateInterval, this);\n this._reset();\n this._update();\n },\n\n onRemove: function () {\n this._map.removeEventListener(this.getEvents(), this);\n this._removeCells();\n },\n\n getEvents: function () {\n var events = {\n moveend: this._update,\n movestart: this._start,\n zoomend: this._reset\n };\n\n return events;\n },\n\n addTo: function (map) {\n map.addLayer(this);\n return this;\n },\n\n removeFrom: function (map) {\n map.removeLayer(this);\n return this;\n },\n\n _start: function () {\n this._ok = true;\n },\n\n _reset: function () {\n if (!this._ok) {\n return;\n }\n\n this._removeCells();\n\n this._cells = {};\n this._activeCells = {};\n this._cellsToLoad = 0;\n this._cellsTotal = 0;\n this._cellNumBounds = this._getCellNumBounds();\n\n this._resetWrap();\n this._zooming = false;\n },\n\n _resetWrap: function () {\n var map = this._map;\n var crs = map.options.crs;\n\n if (crs.infinite) { return; }\n\n var cellSize = this._getCellSize();\n\n if (crs.wrapLng) {\n this._wrapLng = [\n Math.floor(map.project([0, crs.wrapLng[0]]).x / cellSize),\n Math.ceil(map.project([0, crs.wrapLng[1]]).x / cellSize)\n ];\n }\n\n if (crs.wrapLat) {\n this._wrapLat = [\n Math.floor(map.project([crs.wrapLat[0], 0]).y / cellSize),\n Math.ceil(map.project([crs.wrapLat[1], 0]).y / cellSize)\n ];\n }\n },\n\n _getCellSize: function () {\n return this.options.cellSize;\n },\n\n _update: function () {\n if (!this._ok) {\n return;\n }\n\n if (!this._map) {\n return;\n }\n\n var bounds = this._map.getPixelBounds();\n var cellSize = this._getCellSize();\n\n // cell coordinates range for the current view\n var cellBounds = L.bounds(\n bounds.min.divideBy(cellSize).floor(),\n bounds.max.divideBy(cellSize).floor());\n\n this._removeOtherCells(cellBounds);\n this._addCells(cellBounds);\n\n this.fire('cellsupdated');\n\n this._ok = false;\n },\n\n _addCells: function (bounds) {\n var queue = [];\n var center = bounds.getCenter();\n var zoom = this._map.getZoom();\n\n var j, i, coords;\n // create a queue of coordinates to load cells from\n for (j = bounds.min.y; j <= bounds.max.y; j++) {\n for (i = bounds.min.x; i <= bounds.max.x; i++) {\n coords = L.point(i, j);\n coords.z = zoom;\n\n if (this._isValidCell(coords)) {\n queue.push(coords);\n }\n }\n }\n\n var cellsToLoad = queue.length;\n\n if (cellsToLoad === 0) { return; }\n\n this._cellsToLoad += cellsToLoad;\n this._cellsTotal += cellsToLoad;\n\n // sort cell queue to load cells in order of their distance to center\n queue.sort(function (a, b) {\n return a.distanceTo(center) - b.distanceTo(center);\n });\n\n for (i = 0; i < cellsToLoad; i++) {\n this._addCell(queue[i]);\n }\n },\n\n _isValidCell: function (coords) {\n var crs = this._map.options.crs;\n\n if (!crs.infinite) {\n // don't load cell if it's out of bounds and not wrapped\n var bounds = this._cellNumBounds;\n if (\n (!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||\n (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))\n ) {\n return false;\n }\n }\n\n if (!this.options.bounds) {\n return true;\n }\n\n // don't load cell if it doesn't intersect the bounds in options\n var cellBounds = this._cellCoordsToBounds(coords);\n return L.latLngBounds(this.options.bounds).intersects(cellBounds);\n },\n\n // converts cell coordinates to its geographical bounds\n _cellCoordsToBounds: function (coords) {\n var map = this._map;\n var cellSize = this.options.cellSize;\n var nwPoint = coords.multiplyBy(cellSize);\n var sePoint = nwPoint.add([cellSize, cellSize]);\n var nw = map.wrapLatLng(map.unproject(nwPoint, coords.z));\n var se = map.wrapLatLng(map.unproject(sePoint, coords.z));\n\n return L.latLngBounds(nw, se);\n },\n\n // converts cell coordinates to key for the cell cache\n _cellCoordsToKey: function (coords) {\n return coords.x + ':' + coords.y;\n },\n\n // converts cell cache key to coordiantes\n _keyToCellCoords: function (key) {\n var kArr = key.split(':');\n var x = parseInt(kArr[0], 10);\n var y = parseInt(kArr[1], 10);\n\n return L.point(x, y);\n },\n\n // remove any present cells that are off the specified bounds\n _removeOtherCells: function (bounds) {\n for (var key in this._cells) {\n if (!bounds.contains(this._keyToCellCoords(key))) {\n this._removeCell(key);\n }\n }\n },\n\n _removeCell: function (key) {\n var cell = this._activeCells[key];\n\n if (cell) {\n delete this._activeCells[key];\n\n if (this.cellLeave) {\n this.cellLeave(cell.bounds, cell.coords);\n }\n\n this.fire('cellleave', {\n bounds: cell.bounds,\n coords: cell.coords\n });\n }\n },\n\n _removeCells: function () {\n for (var key in this._cells) {\n var bounds = this._cells[key].bounds;\n var coords = this._cells[key].coords;\n\n if (this.cellLeave) {\n this.cellLeave(bounds, coords);\n }\n\n this.fire('cellleave', {\n bounds: bounds,\n coords: coords\n });\n }\n },\n\n _addCell: function (coords) {\n // wrap cell coords if necessary (depending on CRS)\n this._wrapCoords(coords);\n\n // generate the cell key\n var key = this._cellCoordsToKey(coords);\n\n // get the cell from the cache\n var cell = this._cells[key];\n // if this cell should be shown as isnt active yet (enter)\n\n if (cell && !this._activeCells[key]) {\n if (this.cellEnter) {\n this.cellEnter(cell.bounds, coords);\n }\n\n this.fire('cellenter', {\n bounds: cell.bounds,\n coords: coords\n });\n\n this._activeCells[key] = cell;\n }\n\n // if we dont have this cell in the cache yet (create)\n if (!cell) {\n cell = {\n coords: coords,\n bounds: this._cellCoordsToBounds(coords)\n };\n\n this._cells[key] = cell;\n this._activeCells[key] = cell;\n\n if (this.createCell) {\n this.createCell(cell.bounds, coords);\n }\n\n this.fire('cellcreate', {\n bounds: cell.bounds,\n coords: coords\n });\n }\n },\n\n _wrapCoords: function (coords) {\n coords.x = this._wrapLng ? L.Util.wrapNum(coords.x, this._wrapLng) : coords.x;\n coords.y = this._wrapLat ? L.Util.wrapNum(coords.y, this._wrapLat) : coords.y;\n },\n\n // get the global cell coordinates range for the current zoom\n _getCellNumBounds: function () {\n var bounds = this._map.getPixelWorldBounds();\n var size = this._getCellSize();\n\n return bounds ? L.bounds(\n bounds.min.divideBy(size).floor(),\n bounds.max.divideBy(size).ceil().subtract([1, 1])) : null;\n }\n});\n\nexport default VirtualGrid;\n","function BinarySearchIndex (values) {\n this.values = [].concat(values || []);\n}\n\nBinarySearchIndex.prototype.query = function (value) {\n var index = this.getIndex(value);\n return this.values[index];\n};\n\nBinarySearchIndex.prototype.getIndex = function getIndex (value) {\n if (this.dirty) {\n this.sort();\n }\n\n var minIndex = 0;\n var maxIndex = this.values.length - 1;\n var currentIndex;\n var currentElement;\n\n while (minIndex <= maxIndex) {\n currentIndex = (minIndex + maxIndex) / 2 | 0;\n currentElement = this.values[Math.round(currentIndex)];\n if (+currentElement.value < +value) {\n minIndex = currentIndex + 1;\n } else if (+currentElement.value > +value) {\n maxIndex = currentIndex - 1;\n } else {\n return currentIndex;\n }\n }\n\n return Math.abs(~maxIndex);\n};\n\nBinarySearchIndex.prototype.between = function between (start, end) {\n var startIndex = this.getIndex(start);\n var endIndex = this.getIndex(end);\n\n if (startIndex === 0 && endIndex === 0) {\n return [];\n }\n\n while (this.values[startIndex - 1] && this.values[startIndex - 1].value === start) {\n startIndex--;\n }\n\n while (this.values[endIndex + 1] && this.values[endIndex + 1].value === end) {\n endIndex++;\n }\n\n if (this.values[endIndex] && this.values[endIndex].value === end && this.values[endIndex + 1]) {\n endIndex++;\n }\n\n return this.values.slice(startIndex, endIndex);\n};\n\nBinarySearchIndex.prototype.insert = function insert (item) {\n this.values.splice(this.getIndex(item.value), 0, item);\n return this;\n};\n\nBinarySearchIndex.prototype.bulkAdd = function bulkAdd (items, sort) {\n this.values = this.values.concat([].concat(items || []));\n\n if (sort) {\n this.sort();\n } else {\n this.dirty = true;\n }\n\n return this;\n};\n\nBinarySearchIndex.prototype.sort = function sort () {\n this.values.sort(function (a, b) {\n return +b.value - +a.value;\n }).reverse();\n this.dirty = false;\n return this;\n};\n\nexport default BinarySearchIndex;\n","import L from 'leaflet';\nimport featureLayerService from '../../Services/FeatureLayerService';\nimport { cleanUrl, warn } from '../../Util';\nimport VirtualGrid from 'leaflet-virtual-grid';\nimport BinarySearchIndex from 'tiny-binary-search';\n\nexport var FeatureManager = VirtualGrid.extend({\n /**\n * Options\n */\n\n options: {\n attribution: null,\n where: '1=1',\n fields: ['*'],\n from: false,\n to: false,\n timeField: false,\n timeFilterMode: 'server',\n simplifyFactor: 0,\n precision: 6\n },\n\n /**\n * Constructor\n */\n\n initialize: function (options) {\n VirtualGrid.prototype.initialize.call(this, options);\n\n options.url = cleanUrl(options.url);\n options = L.setOptions(this, options);\n\n this.service = featureLayerService(options);\n this.service.addEventParent(this);\n\n // use case insensitive regex to look for common fieldnames used for indexing\n if (this.options.fields[0] !== '*') {\n var oidCheck = false;\n for (var i = 0; i < this.options.fields.length; i++) {\n if (this.options.fields[i].match(/^(OBJECTID|FID|OID|ID)$/i)) {\n oidCheck = true;\n }\n }\n if (oidCheck === false) {\n warn('no known esriFieldTypeOID field detected in fields Array. Please add an attribute field containing unique IDs to ensure the layer can be drawn correctly.');\n }\n }\n\n if (this.options.timeField.start && this.options.timeField.end) {\n this._startTimeIndex = new BinarySearchIndex();\n this._endTimeIndex = new BinarySearchIndex();\n } else if (this.options.timeField) {\n this._timeIndex = new BinarySearchIndex();\n }\n\n this._cache = {};\n this._currentSnapshot = []; // cache of what layers should be active\n this._activeRequests = 0;\n },\n\n /**\n * Layer Interface\n */\n\n onAdd: function (map) {\n map.on('zoomend', this._handleZoomChange, this);\n\n return VirtualGrid.prototype.onAdd.call(this, map);\n },\n\n onRemove: function (map) {\n map.off('zoomend', this._handleZoomChange, this);\n\n return VirtualGrid.prototype.onRemove.call(this, map);\n },\n\n getAttribution: function () {\n return this.options.attribution;\n },\n\n /**\n * Feature Management\n */\n\n createCell: function (bounds, coords) {\n this._requestFeatures(bounds, coords);\n },\n\n _requestFeatures: function (bounds, coords, callback) {\n this._activeRequests++;\n\n // our first active request fires loading\n if (this._activeRequests === 1) {\n this.fire('loading', {\n bounds: bounds\n }, true);\n }\n\n return this._buildQuery(bounds).run(function (error, featureCollection, response) {\n if (response && response.exceededTransferLimit) {\n this.fire('drawlimitexceeded');\n }\n\n // no error, features\n if (!error && featureCollection && featureCollection.features.length) {\n // schedule adding features until the next animation frame\n L.Util.requestAnimFrame(L.Util.bind(function () {\n this._addFeatures(featureCollection.features, coords);\n this._postProcessFeatures(bounds);\n }, this));\n }\n\n // no error, no features\n if (!error && featureCollection && !featureCollection.features.length) {\n this._postProcessFeatures(bounds);\n }\n\n if (error) {\n this._postProcessFeatures(bounds);\n }\n\n if (callback) {\n callback.call(this, error, featureCollection);\n }\n }, this);\n },\n\n _postProcessFeatures: function (bounds) {\n // deincriment the request counter now that we have processed features\n this._activeRequests--;\n\n // if there are no more active requests fire a load event for this view\n if (this._activeRequests <= 0) {\n this.fire('load', {\n bounds: bounds\n });\n }\n },\n\n _cacheKey: function (coords) {\n return coords.z + ':' + coords.x + ':' + coords.y;\n },\n\n _addFeatures: function (features, coords) {\n var key = this._cacheKey(coords);\n this._cache[key] = this._cache[key] || [];\n\n for (var i = features.length - 1; i >= 0; i--) {\n var id = features[i].id;\n this._currentSnapshot.push(id);\n this._cache[key].push(id);\n }\n\n if (this.options.timeField) {\n this._buildTimeIndexes(features);\n }\n\n // need to PR removal of the logic below too...\n // https://github.com/patrickarlt/leaflet-virtual-grid/blob/master/src/virtual-grid.js#L100-L102\n\n this.createLayers(features);\n },\n\n _buildQuery: function (bounds) {\n var query = this.service.query()\n .intersects(bounds)\n .where(this.options.where)\n .fields(this.options.fields)\n .precision(this.options.precision);\n\n if (this.options.simplifyFactor) {\n query.simplify(this._map, this.options.simplifyFactor);\n }\n\n if (this.options.timeFilterMode === 'server' && this.options.from && this.options.to) {\n query.between(this.options.from, this.options.to);\n }\n\n return query;\n },\n\n /**\n * Where Methods\n */\n\n setWhere: function (where, callback, context) {\n this.options.where = (where && where.length) ? where : '1=1';\n\n var oldSnapshot = [];\n var newSnapshot = [];\n var pendingRequests = 0;\n var requestError = null;\n var requestCallback = L.Util.bind(function (error, featureCollection) {\n if (error) {\n requestError = error;\n }\n\n if (featureCollection) {\n for (var i = featureCollection.features.length - 1; i >= 0; i--) {\n newSnapshot.push(featureCollection.features[i].id);\n }\n }\n\n pendingRequests--;\n\n if (pendingRequests <= 0) {\n this._currentSnapshot = newSnapshot;\n // schedule adding features for the next animation frame\n L.Util.requestAnimFrame(L.Util.bind(function () {\n this.removeLayers(oldSnapshot);\n this.addLayers(newSnapshot);\n if (callback) {\n callback.call(context, requestError);\n }\n }, this));\n }\n }, this);\n\n for (var i = this._currentSnapshot.length - 1; i >= 0; i--) {\n oldSnapshot.push(this._currentSnapshot[i]);\n }\n\n for (var key in this._activeCells) {\n pendingRequests++;\n var coords = this._keyToCellCoords(key);\n var bounds = this._cellCoordsToBounds(coords);\n this._requestFeatures(bounds, key, requestCallback);\n }\n\n return this;\n },\n\n getWhere: function () {\n return this.options.where;\n },\n\n /**\n * Time Range Methods\n */\n\n getTimeRange: function () {\n return [this.options.from, this.options.to];\n },\n\n setTimeRange: function (from, to, callback, context) {\n var oldFrom = this.options.from;\n var oldTo = this.options.to;\n var pendingRequests = 0;\n var requestError = null;\n var requestCallback = L.Util.bind(function (error) {\n if (error) {\n requestError = error;\n }\n this._filterExistingFeatures(oldFrom, oldTo, from, to);\n\n pendingRequests--;\n\n if (callback && pendingRequests <= 0) {\n callback.call(context, requestError);\n }\n }, this);\n\n this.options.from = from;\n this.options.to = to;\n\n this._filterExistingFeatures(oldFrom, oldTo, from, to);\n\n if (this.options.timeFilterMode === 'server') {\n for (var key in this._activeCells) {\n pendingRequests++;\n var coords = this._keyToCellCoords(key);\n var bounds = this._cellCoordsToBounds(coords);\n this._requestFeatures(bounds, key, requestCallback);\n }\n }\n\n return this;\n },\n\n refresh: function () {\n for (var key in this._activeCells) {\n var coords = this._keyToCellCoords(key);\n var bounds = this._cellCoordsToBounds(coords);\n this._requestFeatures(bounds, key);\n }\n\n if (this.redraw) {\n this.once('load', function () {\n this.eachFeature(function (layer) {\n this._redraw(layer.feature.id);\n }, this);\n }, this);\n }\n },\n\n _filterExistingFeatures: function (oldFrom, oldTo, newFrom, newTo) {\n var layersToRemove = (oldFrom && oldTo) ? this._getFeaturesInTimeRange(oldFrom, oldTo) : this._currentSnapshot;\n var layersToAdd = this._getFeaturesInTimeRange(newFrom, newTo);\n\n if (layersToAdd.indexOf) {\n for (var i = 0; i < layersToAdd.length; i++) {\n var shouldRemoveLayer = layersToRemove.indexOf(layersToAdd[i]);\n if (shouldRemoveLayer >= 0) {\n layersToRemove.splice(shouldRemoveLayer, 1);\n }\n }\n }\n\n // schedule adding features until the next animation frame\n L.Util.requestAnimFrame(L.Util.bind(function () {\n this.removeLayers(layersToRemove);\n this.addLayers(layersToAdd);\n }, this));\n },\n\n _getFeaturesInTimeRange: function (start, end) {\n var ids = [];\n var search;\n\n if (this.options.timeField.start && this.options.timeField.end) {\n var startTimes = this._startTimeIndex.between(start, end);\n var endTimes = this._endTimeIndex.between(start, end);\n search = startTimes.concat(endTimes);\n } else {\n search = this._timeIndex.between(start, end);\n }\n\n for (var i = search.length - 1; i >= 0; i--) {\n ids.push(search[i].id);\n }\n\n return ids;\n },\n\n _buildTimeIndexes: function (geojson) {\n var i;\n var feature;\n if (this.options.timeField.start && this.options.timeField.end) {\n var startTimeEntries = [];\n var endTimeEntries = [];\n for (i = geojson.length - 1; i >= 0; i--) {\n feature = geojson[i];\n startTimeEntries.push({\n id: feature.id,\n value: new Date(feature.properties[this.options.timeField.start])\n });\n endTimeEntries.push({\n id: feature.id,\n value: new Date(feature.properties[this.options.timeField.end])\n });\n }\n this._startTimeIndex.bulkAdd(startTimeEntries);\n this._endTimeIndex.bulkAdd(endTimeEntries);\n } else {\n var timeEntries = [];\n for (i = geojson.length - 1; i >= 0; i--) {\n feature = geojson[i];\n timeEntries.push({\n id: feature.id,\n value: new Date(feature.properties[this.options.timeField])\n });\n }\n\n this._timeIndex.bulkAdd(timeEntries);\n }\n },\n\n _featureWithinTimeRange: function (feature) {\n if (!this.options.from || !this.options.to) {\n return true;\n }\n\n var from = +this.options.from.valueOf();\n var to = +this.options.to.valueOf();\n\n if (typeof this.options.timeField === 'string') {\n var date = +feature.properties[this.options.timeField];\n return (date >= from) && (date <= to);\n }\n\n if (this.options.timeField.start && this.options.timeField.end) {\n var startDate = +feature.properties[this.options.timeField.start];\n var endDate = +feature.properties[this.options.timeField.end];\n return ((startDate >= from) && (startDate <= to)) || ((endDate >= from) && (endDate <= to));\n }\n },\n\n _visibleZoom: function () {\n // check to see whether the current zoom level of the map is within the optional limit defined for the FeatureLayer\n if (!this._map) {\n return false;\n }\n var zoom = this._map.getZoom();\n if (zoom > this.options.maxZoom || zoom < this.options.minZoom) {\n return false;\n } else { return true; }\n },\n\n _handleZoomChange: function () {\n if (!this._visibleZoom()) {\n this.removeLayers(this._currentSnapshot);\n this._currentSnapshot = [];\n } else {\n /*\n for every cell in this._activeCells\n 1. Get the cache key for the coords of the cell\n 2. If this._cache[key] exists it will be an array of feature IDs.\n 3. Call this.addLayers(this._cache[key]) to instruct the feature layer to add the layers back.\n */\n for (var i in this._activeCells) {\n var coords = this._activeCells[i].coords;\n var key = this._cacheKey(coords);\n if (this._cache[key]) {\n this.addLayers(this._cache[key]);\n }\n }\n }\n },\n\n /**\n * Service Methods\n */\n\n authenticate: function (token) {\n this.service.authenticate(token);\n return this;\n },\n\n metadata: function (callback, context) {\n this.service.metadata(callback, context);\n return this;\n },\n\n query: function () {\n return this.service.query();\n },\n\n _getMetadata: function (callback) {\n if (this._metadata) {\n var error;\n callback(error, this._metadata);\n } else {\n this.metadata(L.Util.bind(function (error, response) {\n this._metadata = response;\n callback(error, this._metadata);\n }, this));\n }\n },\n\n addFeature: function (feature, callback, context) {\n this._getMetadata(L.Util.bind(function (error, metadata) {\n if (error) {\n if (callback) { callback.call(this, error, null); }\n return;\n }\n\n this.service.addFeature(feature, L.Util.bind(function (error, response) {\n if (!error) {\n // assign ID from result to appropriate objectid field from service metadata\n feature.properties[metadata.objectIdField] = response.objectId;\n\n // we also need to update the geojson id for createLayers() to function\n feature.id = response.objectId;\n this.createLayers([feature]);\n }\n\n if (callback) {\n callback.call(context, error, response);\n }\n }, this));\n }, this));\n },\n\n updateFeature: function (feature, callback, context) {\n this.service.updateFeature(feature, function (error, response) {\n if (!error) {\n this.removeLayers([feature.id], true);\n this.createLayers([feature]);\n }\n\n if (callback) {\n callback.call(context, error, response);\n }\n }, this);\n },\n\n deleteFeature: function (id, callback, context) {\n this.service.deleteFeature(id, function (error, response) {\n if (!error && response.objectId) {\n this.removeLayers([response.objectId], true);\n }\n if (callback) {\n callback.call(context, error, response);\n }\n }, this);\n },\n\n deleteFeatures: function (ids, callback, context) {\n return this.service.deleteFeatures(ids, function (error, response) {\n if (!error && response.length > 0) {\n for (var i = 0; i < response.length; i++) {\n this.removeLayers([response[i].objectId], true);\n }\n }\n if (callback) {\n callback.call(context, error, response);\n }\n }, this);\n }\n});\n","import L from 'leaflet';\nimport { FeatureManager } from './FeatureManager';\n\nexport var FeatureLayer = FeatureManager.extend({\n\n options: {\n cacheLayers: true\n },\n\n /**\n * Constructor\n */\n initialize: function (options) {\n FeatureManager.prototype.initialize.call(this, options);\n this._originalStyle = this.options.style;\n this._layers = {};\n },\n\n /**\n * Layer Interface\n */\n\n onRemove: function (map) {\n for (var i in this._layers) {\n map.removeLayer(this._layers[i]);\n }\n\n return FeatureManager.prototype.onRemove.call(this, map);\n },\n\n createNewLayer: function (geojson) {\n var layer = L.GeoJSON.geometryToLayer(geojson, this.options);\n layer.defaultOptions = layer.options;\n return layer;\n },\n\n _updateLayer: function (layer, geojson) {\n // convert the geojson coordinates into a Leaflet LatLng array/nested arrays\n // pass it to setLatLngs to update layer geometries\n var latlngs = [];\n var coordsToLatLng = this.options.coordsToLatLng || L.GeoJSON.coordsToLatLng;\n\n // copy new attributes, if present\n if (geojson.properties) {\n layer.feature.properties = geojson.properties;\n }\n\n switch (geojson.geometry.type) {\n case 'Point':\n latlngs = L.GeoJSON.coordsToLatLng(geojson.geometry.coordinates);\n layer.setLatLng(latlngs);\n break;\n case 'LineString':\n latlngs = L.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 0, coordsToLatLng);\n layer.setLatLngs(latlngs);\n break;\n case 'MultiLineString':\n latlngs = L.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng);\n layer.setLatLngs(latlngs);\n break;\n case 'Polygon':\n latlngs = L.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng);\n layer.setLatLngs(latlngs);\n break;\n case 'MultiPolygon':\n latlngs = L.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 2, coordsToLatLng);\n layer.setLatLngs(latlngs);\n break;\n }\n },\n\n /**\n * Feature Management Methods\n */\n\n createLayers: function (features) {\n for (var i = features.length - 1; i >= 0; i--) {\n var geojson = features[i];\n\n var layer = this._layers[geojson.id];\n var newLayer;\n\n if (this._visibleZoom() && layer && !this._map.hasLayer(layer)) {\n this._map.addLayer(layer);\n }\n\n // update geometry if necessary\n if (layer && this.options.simplifyFactor > 0 && (layer.setLatLngs || layer.setLatLng)) {\n this._updateLayer(layer, geojson);\n }\n\n if (!layer) {\n newLayer = this.createNewLayer(geojson);\n newLayer.feature = geojson;\n\n // bubble events from individual layers to the feature layer\n newLayer.addEventParent(this);\n\n if (this.options.onEachFeature) {\n this.options.onEachFeature(newLayer.feature, newLayer);\n }\n\n // cache the layer\n this._layers[newLayer.feature.id] = newLayer;\n\n // style the layer\n this.setFeatureStyle(newLayer.feature.id, this.options.style);\n\n this.fire('createfeature', {\n feature: newLayer.feature\n }, true);\n\n // add the layer if the current zoom level is inside the range defined for the layer, it is within the current time bounds or our layer is not time enabled\n if (this._visibleZoom() && (!this.options.timeField || (this.options.timeField && this._featureWithinTimeRange(geojson)))) {\n this._map.addLayer(newLayer);\n }\n }\n }\n },\n\n addLayers: function (ids) {\n for (var i = ids.length - 1; i >= 0; i--) {\n var layer = this._layers[ids[i]];\n if (layer) {\n this.fire('addfeature', {\n feature: layer.feature\n }, true);\n this._map.addLayer(layer);\n }\n }\n },\n\n removeLayers: function (ids, permanent) {\n for (var i = ids.length - 1; i >= 0; i--) {\n var id = ids[i];\n var layer = this._layers[id];\n if (layer) {\n this.fire('removefeature', {\n feature: layer.feature,\n permanent: permanent\n }, true);\n this._map.removeLayer(layer);\n }\n if (layer && permanent) {\n delete this._layers[id];\n }\n }\n },\n\n cellEnter: function (bounds, coords) {\n if (!this._zooming && this._map) {\n L.Util.requestAnimFrame(L.Util.bind(function () {\n var cacheKey = this._cacheKey(coords);\n var cellKey = this._cellCoordsToKey(coords);\n var layers = this._cache[cacheKey];\n if (this._activeCells[cellKey] && layers) {\n this.addLayers(layers);\n }\n }, this));\n }\n },\n\n cellLeave: function (bounds, coords) {\n if (!this._zooming) {\n L.Util.requestAnimFrame(L.Util.bind(function () {\n if (this._map) {\n var cacheKey = this._cacheKey(coords);\n var cellKey = this._cellCoordsToKey(coords);\n var layers = this._cache[cacheKey];\n var mapBounds = this._map.getBounds();\n if (!this._activeCells[cellKey] && layers) {\n var removable = true;\n\n for (var i = 0; i < layers.length; i++) {\n var layer = this._layers[layers[i]];\n if (layer && layer.getBounds && mapBounds.intersects(layer.getBounds())) {\n removable = false;\n }\n }\n\n if (removable) {\n this.removeLayers(layers, !this.options.cacheLayers);\n }\n\n if (!this.options.cacheLayers && removable) {\n delete this._cache[cacheKey];\n delete this._cells[cellKey];\n delete this._activeCells[cellKey];\n }\n }\n }\n }, this));\n }\n },\n\n /**\n * Styling Methods\n */\n\n resetStyle: function () {\n this.options.style = this._originalStyle;\n this.eachFeature(function (layer) {\n this.resetFeatureStyle(layer.feature.id);\n }, this);\n return this;\n },\n\n setStyle: function (style) {\n this.options.style = style;\n this.eachFeature(function (layer) {\n this.setFeatureStyle(layer.feature.id, style);\n }, this);\n return this;\n },\n\n resetFeatureStyle: function (id) {\n var layer = this._layers[id];\n var style = this._originalStyle || L.Path.prototype.options;\n if (layer) {\n L.Util.extend(layer.options, layer.defaultOptions);\n this.setFeatureStyle(id, style);\n }\n return this;\n },\n\n setFeatureStyle: function (id, style) {\n var layer = this._layers[id];\n if (typeof style === 'function') {\n style = style(layer.feature);\n }\n if (layer.setStyle) {\n layer.setStyle(style);\n }\n return this;\n },\n\n /**\n * Utility Methods\n */\n\n eachFeature: function (fn, context) {\n for (var i in this._layers) {\n fn.call(context, this._layers[i]);\n }\n return this;\n },\n\n getFeature: function (id) {\n return this._layers[id];\n },\n\n bringToBack: function () {\n this.eachFeature(function (layer) {\n if (layer.bringToBack) {\n layer.bringToBack();\n }\n });\n },\n\n bringToFront: function () {\n this.eachFeature(function (layer) {\n if (layer.bringToFront) {\n layer.bringToFront();\n }\n });\n },\n\n redraw: function (id) {\n if (id) {\n this._redraw(id);\n }\n return this;\n },\n\n _redraw: function (id) {\n var layer = this._layers[id];\n var geojson = layer.feature;\n\n // if this looks like a marker\n if (layer && layer.setIcon && this.options.pointToLayer) {\n // update custom symbology, if necessary\n if (this.options.pointToLayer) {\n var getIcon = this.options.pointToLayer(geojson, L.latLng(geojson.geometry.coordinates[1], geojson.geometry.coordinates[0]));\n var updatedIcon = getIcon.options.icon;\n layer.setIcon(updatedIcon);\n }\n }\n\n // looks like a vector marker (circleMarker)\n if (layer && layer.setStyle && this.options.pointToLayer) {\n var getStyle = this.options.pointToLayer(geojson, L.latLng(geojson.geometry.coordinates[1], geojson.geometry.coordinates[0]));\n var updatedStyle = getStyle.options;\n this.setFeatureStyle(geojson.id, updatedStyle);\n }\n\n // looks like a path (polygon/polyline)\n if (layer && layer.setStyle && this.options.style) {\n this.resetStyle(geojson.id);\n }\n }\n});\n\nexport function featureLayer (options) {\n return new FeatureLayer(options);\n}\n\nexport default featureLayer;\n"],"names":["pointsEqual","a","b","i","length","closeRing","coordinates","push","ringIsClockwise","ringToTest","pt2","total","rLength","pt1","vertexIntersectsVertex","a1","a2","b1","b2","uaT","ubT","uB","ua","ub","arrayIntersectsArray","j","coordinatesContainPoint","point","contains","l","coordinatesContainCoordinates","outer","inner","intersects","convertRingsToGeoJSON","rings","x","outerRing","hole","outerRings","holes","r","ring","slice","polygon","uncontainedHoles","pop","contained","reverse","type","orientRings","poly","output","shift","flattenMultiPolygonRings","shallowClone","obj","target","hasOwnProperty","arcgisToGeoJSON","arcgis","idAttribute","geojson","y","points","paths","geometry","attributes","properties","id","OBJECTID","FID","geojsonToArcGIS","spatialReference","wkid","result","features","geometries","idAttr","g2a","a2g","extentToBounds","extent","sw","L","latLng","ymin","xmin","ne","ymax","xmax","latLngBounds","boundsToExtent","bounds","getSouthWest","lng","lat","getNorthEast","responseToFeatureCollection","response","objectIdField","objectIdFieldName","fields","name","featureCollection","results","feature","cleanUrl","url","Util","trim","isArcgisOnline","test","geojsonTypeToArcGIS","geoJsonType","arcgisGeometryType","warn","console","apply","arguments","serialize","params","data","f","key","value","param","Object","prototype","toString","call","JSON","stringify","join","valueOf","encodeURIComponent","createRequest","callback","context","httpRequest","window","XMLHttpRequest","onerror","e","onreadystatechange","falseFn","error","code","message","readyState","parse","responseText","ontimeout","this","xmlHttpPost","options","timeout","open","setRequestHeader","send","xmlHttpGet","request","paramString","requestLength","Support","cors","jsonp","_EsriLeafletCallbacks","callbackId","callbacks","script","DomUtil","create","document","body","src","responseType","abort","_callback","task","Task","query","Query","find","Find","identify","Identify","identifyFeatures","IdentifyFeatures","identifyImage","IdentifyImage","service","Service","mapService","MapService","imageService","ImageService","featureLayerService","FeatureLayerService","logo","Logo","basemapLayer","BasemapLayer","tiledMapLayer","TiledMapLayer","imageMapLayer","ImageMapLayer","dynamicMapLayer","DynamicMapLayer","BinarySearchIndex","values","concat","featureLayer","FeatureLayer","pointerEvents","documentElement","style","get","CORS","JSONP","Request","post","Class","extend","proxy","useCors","generateSetter","bind","initialize","endpoint","_service","setOptions","setters","setter","token","authenticate","path","_request","method","offset","limit","precision","featureIds","returnGeometry","where","outSr","outFields","within","_setGeometry","spatialRel","crosses","touches","overlaps","nearby","latlng","radius","geometryType","units","distance","inSr","string","between","start","end","time","simplify","map","factor","mapWidth","Math","abs","getBounds","getWest","getEast","maxAllowableOffset","getSize","orderBy","fieldName","order","orderByFields","run","_cleanParams","_trapSQLerrors","count","returnCountOnly","ids","returnIdsOnly","objectIds","returnExtentOnly","pixelSize","layer","LatLngBounds","getLatLng","LatLng","GeoJSON","getLayers","toGeoJSON","text","sr","layers","dynamicLayers","returnZ","returnM","gdbVersion","layerDefs","tolerance","on","size","imageDisplay","mapExtent","at","layerDef","undefined","layerId","setMosaicRule","setRenderingRule","setPixelSize","returnCatalogItems","getMosaicRule","mosaicRule","getRenderingRule","renderingRule","getPixelSize","_responseToGeoJSON","location","catalogItems","catalogItemVisibilities","geoJSON","pixel","crs","objectId","Values","catalogItemVisibility","Evented","_requestQueue","_authenticating","metadata","_runQueue","getTimeout","setTimeout","fire","wrappedCallback","_createServiceCallback","addFeature","addResults","updateFeature","updateResults","deleteFeature","deleteResults","deleteFeatures","Control","position","marginTop","marginLeft","marginBottom","marginRight","onAdd","div","innerHTML","tileProtocol","protocol","TileLayer","statics","TILES","Streets","urlTemplate","attributionUrl","hideLogo","logoPosition","minZoom","maxZoom","subdomains","attribution","Topographic","Oceans","OceansLabels","pane","NationalGeographic","DarkGray","DarkGrayLabels","Gray","GrayLabels","Imagery","ImageryLabels","ImageryTransportation","ShadedRelief","ShadedReliefLabels","Terrain","TerrainLabels","config","Error","tileOptions","_getAttributionData","_logo","_hasEsriLogo","addTo","_initPane","_updateMapAttribution","onRemove","_container","removeControl","off","getAttribution","_map","getPane","createPane","zIndex","attributions","_attributions","c","contributors","contributor","coverageAreas","coverageArea","southWest","bbox","northEast","score","zoomMin","zoomMax","sort","attributionControl","newAttributions","zoom","getZoom","match","substr","attributionElement","querySelector","maxWidth","zoomOffsetAllowance","MercatorZoomLevels","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","tileUrl","addEventParent","arcgisonline","RegExp","replace","getTileUrl","tilePoint","template","s","_getSubdomain","z","_lodMap","createTile","coords","done","tile","createElement","DomEvent","_tileOnLoad","_tileOnError","crossOrigin","alt","once","CRS","EPSG3857","latestWkid","arcgisLODs","tileInfo","lods","correctResolutions","arcgisLOD","ci","correctRes","_withinPercentage","resolution","level","tokenQs","percentage","diff","Overlay","ImageOverlay","_topLeft","getPixelBounds","min","_reset","setPosition","_image","subtract","getPixelOrigin","RasterLayer","Layer","opacity","interactive","_update","throttle","updateInterval","_currentImage","_bounds","equals","addLayer","removeLayer","_popup","_getPopupData","_resetPopupState","bindPopup","fn","popupOptions","_shouldRenderPopup","_lastClick","popup","_popupFunction","unbindPopup","closePopup","bringToFront","bringToBack","getOpacity","setOpacity","getTimeRange","from","to","setTimeRange","_renderImage","image","newImage","oldImage","_animatingZoom","_panTransition","_inProgress","_buildExportParams","_requestExport","_renderPopup","content","setLatLng","setContent","openOn","format","transparent","setPixelType","pixelType","getPixelType","setBandIds","bandIds","isArray","getBandIds","setNoData","noData","noDataInterpretation","getNoData","getNoDataInterpretation","identifyRequest","project","_northEast","_southWest","parseInt","split","bboxSR","imageSR","interpolation","compressionQuality","href","getParamString","timeOptions","getDynamicLayers","setDynamicLayers","setLayers","getLayerDefs","setLayerDefs","getTimeOptions","setTimeOptions","top","latLngToLayerPoint","bottom","dpi","VirtualGrid","cellSize","_ok","removeEventListener","getEvents","_removeCells","events","moveend","movestart","_start","zoomend","removeFrom","_cells","_activeCells","_cellsToLoad","_cellsTotal","_cellNumBounds","_getCellNumBounds","_resetWrap","_zooming","infinite","_getCellSize","wrapLng","_wrapLng","floor","ceil","wrapLat","_wrapLat","cellBounds","divideBy","max","_removeOtherCells","_addCells","queue","center","getCenter","_isValidCell","cellsToLoad","distanceTo","_addCell","_cellCoordsToBounds","nwPoint","multiplyBy","sePoint","add","nw","wrapLatLng","unproject","se","_cellCoordsToKey","_keyToCellCoords","kArr","_removeCell","cell","cellLeave","_wrapCoords","cellEnter","createCell","wrapNum","getPixelWorldBounds","index","getIndex","dirty","currentIndex","currentElement","minIndex","maxIndex","round","startIndex","endIndex","insert","item","splice","bulkAdd","items","FeatureManager","timeField","timeFilterMode","simplifyFactor","oidCheck","_startTimeIndex","_endTimeIndex","_timeIndex","_cache","_currentSnapshot","_activeRequests","_handleZoomChange","_requestFeatures","_buildQuery","exceededTransferLimit","requestAnimFrame","_addFeatures","_postProcessFeatures","_cacheKey","_buildTimeIndexes","createLayers","setWhere","oldSnapshot","newSnapshot","pendingRequests","requestError","requestCallback","removeLayers","addLayers","getWhere","oldFrom","oldTo","_filterExistingFeatures","refresh","redraw","eachFeature","_redraw","newFrom","newTo","layersToRemove","_getFeaturesInTimeRange","layersToAdd","indexOf","shouldRemoveLayer","search","startTimes","endTimes","startTimeEntries","endTimeEntries","Date","timeEntries","_featureWithinTimeRange","date","startDate","endDate","_visibleZoom","_getMetadata","_metadata","cacheLayers","_originalStyle","_layers","createNewLayer","geometryToLayer","defaultOptions","_updateLayer","latlngs","coordsToLatLng","coordsToLatLngs","setLatLngs","newLayer","hasLayer","onEachFeature","setFeatureStyle","permanent","cacheKey","cellKey","mapBounds","removable","resetStyle","resetFeatureStyle","setStyle","Path","getFeature","setIcon","pointToLayer","getIcon","updatedIcon","ic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