From a58146fb44c0fbfcba4d35b6c96fb0ae1586efae Mon Sep 17 00:00:00 2001 From: john gravois Date: Thu, 27 Jul 2017 14:41:39 -0700 Subject: [PATCH] build 2.1.0 --- dist/esri-leaflet-debug.js | 4039 ++++++++++++++++++++++++++++++++++++ dist/esri-leaflet.js | 6 + dist/esri-leaflet.js.map | 1 + 3 files changed, 4046 insertions(+) create mode 100644 dist/esri-leaflet-debug.js create mode 100644 dist/esri-leaflet.js create mode 100644 dist/esri-leaflet.js.map diff --git a/dist/esri-leaflet-debug.js b/dist/esri-leaflet-debug.js new file mode 100644 index 000000000..c7142c38d --- /dev/null +++ b/dist/esri-leaflet-debug.js @@ -0,0 +1,4039 @@ +/* esri-leaflet - v2.1.0 - Thu Jul 27 2017 14:41:38 GMT-0700 (PDT) + * Copyright (c) 2017 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$1) { 'use strict'; + + var L$1__default = 'default' in L$1 ? L$1['default'] : L$1; + + var version = "2.1.0"; + + var cors = ((window.XMLHttpRequest && 'withCredentials' in new window.XMLHttpRequest())); + var pointerEvents = document.documentElement.style.pointerEvents === ''; + + var Support = { + cors: cors, + pointerEvents: pointerEvents + }; + + var options = { + attributionWidthOffset: 55 + }; + + 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$1.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$1.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); + httpRequest.open('POST', url); + + if (typeof context !== 'undefined' && context !== null) { + if (typeof context.options !== 'undefined') { + httpRequest.timeout = context.options.timeout; + } + } + 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); + httpRequest.open('GET', url + '?' + serialize(params), true); + + if (typeof context !== 'undefined' && context !== null) { + if (typeof context.options !== 'undefined') { + httpRequest.timeout = context.options.timeout; + } + } + 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); + var requestLength = (url + '?' + paramString).length; + + // ie10/11 require the request be opened before a timeout is applied + if (requestLength <= 2000 && Support.cors) { + httpRequest.open('GET', url + '?' + paramString); + } else if (requestLength > 2000 && Support.cors) { + httpRequest.open('POST', url); + httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + } + + if (typeof context !== 'undefined' && context !== null) { + if (typeof context.options !== 'undefined') { + httpRequest.timeout = context.options.timeout; + } + } + + // request is less than 2000 characters and the browser supports CORS, make GET request with XMLHttpRequest + if (requestLength <= 2000 && Support.cors) { + httpRequest.send(null); + + // request is more than 2000 characters and the browser supports CORS, make POST request with XMLHttpRequest + } else if (requestLength > 2000 && Support.cors) { + httpRequest.send(paramString); + + // request is less than 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; + + 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; + } + }; + + var script = L$1.DomUtil.create('script', null, document.body); + script.type = 'text/javascript'; + script.src = url + '?' + serialize(params); + script.id = callbackId; + + 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 + }; + + /* + * 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) { + // "NaN" coordinates from ArcGIS Server indicate a null geometry + if (extent.xmin !== 'NaN' && extent.ymin !== 'NaN' && extent.xmax !== 'NaN' && extent.ymax !== 'NaN') { + var sw = L$1.latLng(extent.ymin, extent.xmin); + var ne = L$1.latLng(extent.ymax, extent.xmax); + return L$1.latLngBounds(sw, ne); + } else { + return null; + } + } + + // convert an LatLngBounds (Leaflet) to extent (ArcGIS) + function boundsToExtent (bounds) { + bounds = L$1.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; + var features = response.features || response.results; + var count = features.length; + + 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 if (count) { + /* as a last resort, check for common ID fieldnames in the first feature returned + not foolproof. identifyFeatures can returned a mixed array of features. */ + for (var key in features[0].attributes) { + if (key.match(/^(OBJECTID|FID|OID|ID)$/i)) { + objectIdField = key; + break; + } + } + } + + var featureCollection = { + type: 'FeatureCollection', + features: [] + }; + + if (count) { + 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$1.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 support geojson as an output format + utility.arcgis.com services are proxied from a variety of ArcGIS Server vintages, and may not */ + return (/^(?!.*utility\.arcgis\.com).*\.arcgis\.com.*FeatureServer/i).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); + } + } + + function calcAttributionWidth (map) { + // either crop at 55px or user defined buffer + return (map.getSize().x - options.attributionWidthOffset) + 'px'; + } + + function setEsriAttribution (map) { + if (map.attributionControl && !map.attributionControl._esriAttributionAdded) { + map.attributionControl.setPrefix('Leaflet | Powered by Esri'); + + var hoverAttributionStyle = document.createElement('style'); + hoverAttributionStyle.type = 'text/css'; + hoverAttributionStyle.innerHTML = '.esri-truncated-attribution:hover {' + + 'white-space: normal;' + + '}'; + + document.getElementsByTagName('head')[0].appendChild(hoverAttributionStyle); + L$1.DomUtil.addClass(map.attributionControl._container, 'esri-truncated-attribution:hover'); + + // define a new css class in JS to trim attribution into a single line + var attributionStyle = document.createElement('style'); + attributionStyle.type = 'text/css'; + attributionStyle.innerHTML = '.esri-truncated-attribution {' + + 'vertical-align: -3px;' + + 'white-space: nowrap;' + + 'overflow: hidden;' + + 'text-overflow: ellipsis;' + + 'display: inline-block;' + + 'transition: 0s white-space;' + + 'transition-delay: 1s;' + + 'max-width: ' + calcAttributionWidth(map) + ';' + + '}'; + + document.getElementsByTagName('head')[0].appendChild(attributionStyle); + L$1.DomUtil.addClass(map.attributionControl._container, 'esri-truncated-attribution'); + + // update the width used to truncate when the map itself is resized + map.on('resize', function (e) { + map.attributionControl._container.style.maxWidth = calcAttributionWidth(e.target); + }); + + map.attributionControl._esriAttributionAdded = true; + } + } + + function _setGeometry (geometry) { + var params = { + geometry: null, + geometryType: null + }; + + // convert bounds to extent and finish + if (geometry instanceof L$1.LatLngBounds) { + // set geometry + geometryType + params.geometry = boundsToExtent(geometry); + params.geometryType = 'esriGeometryEnvelope'; + return params; + } + + // convert L.Marker > L.LatLng + if (geometry.getLatLng) { + geometry = geometry.getLatLng(); + } + + // convert L.LatLng to a geojson point and continue; + if (geometry instanceof L$1.LatLng) { + geometry = { + type: 'Point', + coordinates: [geometry.lng, geometry.lat] + }; + } + + // handle L.GeoJSON, pull out the first geometry + if (geometry instanceof L$1.GeoJSON) { + // reassign geometry to the GeoJSON value (we are assuming that only one feature is present) + geometry = geometry.getLayers()[0].feature.geometry; + params.geometry = geojsonToArcGIS(geometry); + params.geometryType = 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' || geometry.type === 'MultiPolygon') { + params.geometry = geojsonToArcGIS(geometry); + params.geometryType = geojsonTypeToArcGIS(geometry.type); + return params; + } + + // warn the user if we havn't found an appropriate object + warn('invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object'); + + return; + } + + function _getAttributionData (url, map) { + jsonp(url, {}, L$1.Util.bind(function (error, attributions) { + if (error) { return; } + map._esriAttributions = []; + 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$1.latLng(coverageArea.bbox[0], coverageArea.bbox[1]); + var northEast = L$1.latLng(coverageArea.bbox[2], coverageArea.bbox[3]); + map._esriAttributions.push({ + attribution: contributor.attribution, + score: coverageArea.score, + bounds: L$1.latLngBounds(southWest, northEast), + minZoom: coverageArea.zoomMin, + maxZoom: coverageArea.zoomMax + }); + } + } + + map._esriAttributions.sort(function (a, b) { + return b.score - a.score; + }); + + // pass the same argument as the map's 'moveend' event + var obj = { target: map }; + _updateMapAttribution(obj); + }, this)); + } + + function _updateMapAttribution (evt) { + var map = evt.target; + var oldAttributions = map._esriAttributions; + + if (map && map.attributionControl && oldAttributions) { + var newAttributions = ''; + var bounds = map.getBounds(); + var wrappedBounds = L$1.latLngBounds( + bounds.getSouthWest().wrap(), + bounds.getNorthEast().wrap() + ); + var zoom = map.getZoom(); + + for (var i = 0; i < oldAttributions.length; i++) { + var attribution = oldAttributions[i]; + var text = attribution.attribution; + + if (!newAttributions.match(text) && attribution.bounds.intersects(wrappedBounds) && zoom >= attribution.minZoom && zoom <= attribution.maxZoom) { + newAttributions += (', ' + text); + } + } + + newAttributions = newAttributions.substr(2); + var attributionElement = map.attributionControl._container.querySelector('.esri-dynamic-attribution'); + + attributionElement.innerHTML = newAttributions; + attributionElement.style.maxWidth = calcAttributionWidth(map); + + map.fire('attributionupdated', { + attribution: newAttributions + }); + } + } + + var EsriUtil = { + shallowClone: shallowClone, + warn: warn, + cleanUrl: cleanUrl, + isArcgisOnline: isArcgisOnline, + geojsonTypeToArcGIS: geojsonTypeToArcGIS, + responseToFeatureCollection: responseToFeatureCollection, + geojsonToArcGIS: geojsonToArcGIS, + arcgisToGeoJSON: arcgisToGeoJSON, + boundsToExtent: boundsToExtent, + extentToBounds: extentToBounds, + calcAttributionWidth: calcAttributionWidth, + setEsriAttribution: setEsriAttribution, + _setGeometry: _setGeometry, + _getAttributionData: _getAttributionData, + _updateMapAttribution: _updateMapAttribution + }; + + var Task = L$1.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$1.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$1.Util.setOptions(this, endpoint.options); + } else { + L$1.Util.setOptions(this, endpoint); + this.options.url = cleanUrl(endpoint.url); + } + + // clone default params into this object + this.params = L$1.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; + }, + + // ArcGIS Server Find/Identify 10.5+ + format: function (boolean) { + // use double negative to expose a more intuitive positive method name + this.params.returnUnformattedValues = !boolean; + 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': 'resultOffset', + 'limit': 'resultRecordCount', + 'fields': 'outFields', + 'precision': 'geometryPrecision', + 'featureIds': 'objectIds', + 'returnGeometry': 'returnGeometry', + 'transform': 'datumTransformation', + 'token': 'token' + }, + + path: 'query', + + params: { + returnGeometry: true, + where: '1=1', + outSr: 4326, + outFields: '*' + }, + + // Returns a feature if its shape is wholly contained within the search geometry. Valid for all shape type combinations. + within: function (geometry) { + this._setGeometryParams(geometry); + this.params.spatialRel = 'esriSpatialRelContains'; // to the REST api this reads geometry **contains** layer + return this; + }, + + // Returns a feature if any spatial relationship is found. Applies to all shape type combinations. + intersects: function (geometry) { + this._setGeometryParams(geometry); + this.params.spatialRel = 'esriSpatialRelIntersects'; + return this; + }, + + // Returns a feature if its shape wholly contains the search geometry. Valid for all shape type combinations. + contains: function (geometry) { + this._setGeometryParams(geometry); + this.params.spatialRel = 'esriSpatialRelWithin'; // to the REST api this reads geometry **within** layer + return this; + }, + + // Returns a feature if the intersection of the interiors of the two shapes is not empty and has a lower dimension than the maximum dimension of the two shapes. Two lines that share an endpoint in common do not cross. Valid for Line/Line, Line/Area, Multi-point/Area, and Multi-point/Line shape type combinations. + crosses: function (geometry) { + this._setGeometryParams(geometry); + this.params.spatialRel = 'esriSpatialRelCrosses'; + return this; + }, + + // Returns a feature if the two shapes share a common boundary. However, the intersection of the interiors of the two shapes must be empty. In the Point/Line case, the point may touch an endpoint only of the line. Applies to all combinations except Point/Point. + touches: function (geometry) { + this._setGeometryParams(geometry); + this.params.spatialRel = 'esriSpatialRelTouches'; + return this; + }, + + // Returns a feature if the intersection of the two shapes results in an object of the same dimension, but different from both of the shapes. Applies to Area/Area, Line/Line, and Multi-point/Multi-point shape type combinations. + overlaps: function (geometry) { + this._setGeometryParams(geometry); + this.params.spatialRel = 'esriSpatialRelOverlaps'; + return this; + }, + + // Returns a feature if the envelope of the two shapes intersects. + bboxIntersects: function (geometry) { + this._setGeometryParams(geometry); + this.params.spatialRel = 'esriSpatialRelEnvelopeIntersects'; + return this; + }, + + // if someone can help decipher the ArcObjects explanation and translate to plain speak, we should mention this method in the doc + indexIntersects: function (geometry) { + this._setGeometryParams(geometry); + this.params.spatialRel = 'esriSpatialRelIndexIntersects'; // Returns a feature if the envelope of the query geometry intersects the index entry for the target geometry + return this; + }, + + // only valid for Feature Services running on ArcGIS Server 10.3+ or ArcGIS Online + nearby: function (latlng, radius) { + latlng = L$1.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(); + + // services hosted on ArcGIS Online and ArcGIS Server 10.3.1+ support requesting geojson directly + if (this.options.isModern || 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 && 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) { + if (response && response.extent && extentToBounds(response.extent)) { + callback.call(context, error, extentToBounds(response.extent), response); + } else { + error = { + message: 'Invalid Bounds' + }; + callback.call(context, error, null, response); + } + }, context); + }, + + // only valid for image services + pixelSize: function (rawPoint) { + var castPoint = L$1.point(rawPoint); + this.params.pixelSize = [castPoint.x, castPoint.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') { + 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; + }, + + _setGeometryParams: function (geometry) { + this.params.inSr = 4326; + var converted = _setGeometry(geometry); + this.params.geometry = converted.geometry; + this.params.geometryType = converted.geometryType; + } + + }); + + 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', + // skipped implementing this (for now) because the REST service implementation isnt consistent between operations + // 'transform': 'datumTransformations', + '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 && 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', + // skipped implementing this (for now) because the REST service implementation isnt consistent between operations. + // 'transform': 'datumTransformations' + 'returnGeometry': 'returnGeometry' + }, + + params: { + sr: 4326, + layers: 'all', + tolerance: 3, + returnGeometry: true + }, + + on: function (map) { + var extent = 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 (geometry) { + // cast lat, long pairs in raw array form manually + if (geometry.length === 2) { + geometry = L$1.latLng(geometry); + } + this._setGeometryParams(geometry); + 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) * 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 = 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); + } + }); + }, + + _setGeometryParams: function (geometry) { + var converted = _setGeometry(geometry); + this.params.geometry = converted.geometry; + this.params.geometryType = converted.geometryType; + } + }); + + 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$1.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 = 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$1.Evented.extend({ + + options: { + proxy: false, + useCors: cors, + timeout: 0 + }, + + initialize: function (options) { + options = options || {}; + this._requestQueue = []; + this._authenticating = false; + L$1.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$1.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$1.Util.bind(this.authenticate, this) + }, true); + + // if the user has access to a callback they can handle the auth error + error.authenticate = L$1.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 tileProtocol = (window.location.protocol !== 'https:') ? 'http:' : 'https:'; + + var BasemapLayer = L$1.TileLayer.extend({ + statics: { + TILES: { + Streets: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 19, + subdomains: ['server', 'services'], + attribution: 'USGS, NOAA', + attributionUrl: 'https://static.arcgis.com/attribution/World_Street_Map' + } + }, + Topographic: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 19, + subdomains: ['server', 'services'], + attribution: 'USGS, NOAA', + attributionUrl: 'https://static.arcgis.com/attribution/World_Topo_Map' + } + }, + Oceans: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 16, + subdomains: ['server', 'services'], + attribution: 'USGS, NOAA', + attributionUrl: 'https://static.arcgis.com/attribution/Ocean_Basemap' + } + }, + OceansLabels: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}', + options: { + 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: { + minZoom: 1, + maxZoom: 16, + subdomains: ['server', 'services'], + attribution: 'National Geographic, 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: { + minZoom: 1, + maxZoom: 16, + subdomains: ['server', 'services'], + attribution: '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: { + minZoom: 1, + maxZoom: 16, + subdomains: ['server', 'services'], + pane: (pointerEvents) ? 'esri-labels' : 'tilePane', + attribution: '' + + } + }, + Gray: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 16, + subdomains: ['server', 'services'], + attribution: '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: { + minZoom: 1, + maxZoom: 16, + subdomains: ['server', 'services'], + pane: (pointerEvents) ? 'esri-labels' : 'tilePane', + attribution: '' + } + }, + Imagery: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 19, + subdomains: ['server', 'services'], + attribution: '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: { + minZoom: 1, + maxZoom: 19, + subdomains: ['server', 'services'], + pane: (pointerEvents) ? 'esri-labels' : 'tilePane', + attribution: '' + } + }, + ImageryTransportation: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}', + options: { + 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: { + minZoom: 1, + maxZoom: 13, + subdomains: ['server', 'services'], + attribution: 'USGS' + } + }, + ShadedReliefLabels: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 12, + subdomains: ['server', 'services'], + pane: (pointerEvents) ? 'esri-labels' : 'tilePane', + attribution: '' + } + }, + Terrain: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 13, + subdomains: ['server', 'services'], + attribution: 'USGS, NOAA' + } + }, + TerrainLabels: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 13, + subdomains: ['server', 'services'], + pane: (pointerEvents) ? 'esri-labels' : 'tilePane', + attribution: '' + } + }, + USATopo: { + urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}', + options: { + minZoom: 1, + maxZoom: 15, + subdomains: ['server', 'services'], + attribution: 'USGS, National Geographic Society, i-cubed' + } + } + } + }, + + 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", "TerrainLabels" or "USATopo"'); + } + + // merge passed options into the config options + var tileOptions = L$1.Util.extend(config.options, options); + + L$1.Util.setOptions(this, tileOptions); + + if (this.options.token) { + config.urlTemplate += ('?token=' + this.options.token); + } + + // call the initialize method on L.TileLayer to set everything up + L$1.TileLayer.prototype.initialize.call(this, config.urlTemplate, tileOptions); + }, + + onAdd: function (map) { + // include 'Powered by Esri' in map attribution + setEsriAttribution(map); + + if (this.options.pane === 'esri-labels') { + this._initPane(); + } + // some basemaps can supply dynamic attribution + if (this.options.attributionUrl) { + _getAttributionData(this.options.attributionUrl, map); + } + + map.on('moveend', _updateMapAttribution); + + L$1.TileLayer.prototype.onAdd.call(this, map); + }, + + onRemove: function (map) { + map.off('moveend', _updateMapAttribution); + L$1.TileLayer.prototype.onRemove.call(this, map); + }, + + _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; + } + }, + + getAttribution: function () { + if (this.options.attribution) { + var attribution = '' + this.options.attribution + ''; + } + return attribution; + } + }); + + function basemapLayer (key, options) { + return new BasemapLayer(key, options); + } + + var TiledMapLayer = L$1.TileLayer.extend({ + options: { + zoomOffsetAllowance: 0.1, + errorTileUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEABAMAAACuXLVVAAAAA1BMVEUzNDVszlHHAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7waBAAABw08RwAAAAABJRU5ErkJggg==' + }, + + 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$1.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$1.TileLayer.prototype.initialize.call(this, this.tileUrl, options); + }, + + getTileUrl: function (tilePoint) { + var zoom = this._getZoomForUrl(); + + return L$1.Util.template(this.tileUrl, L$1.Util.extend({ + s: this._getSubdomain(tilePoint), + x: tilePoint.x, + y: tilePoint.y, + // try lod map first, then just default to zoom level + z: (this._lodMap && this._lodMap[zoom]) ? this._lodMap[zoom] : zoom + }, 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[this._getZoomForUrl()])) { + tile.src = this.getTileUrl(coords); + } else { + this.once('lodmap', function () { + tile.src = this.getTileUrl(coords); + }, this); + } + + return tile; + }, + + onAdd: function (map) { + // include 'Powered by Esri' in map attribution + setEsriAttribution(map); + + if (!this._lodMap) { + this.metadata(function (error, metadata) { + if (!error && metadata.spatialReference) { + var sr = metadata.spatialReference.latestWkid || metadata.spatialReference.wkid; + if (!this.options.attribution && map.attributionControl && metadata.copyrightText) { + this.options.attribution = metadata.copyrightText; + map.attributionControl.addAttribution(this.getAttribution()); + } + if (map.options.crs === L.CRS.EPSG3857 && sr === 102100 || sr === 3857) { + this._lodMap = {}; + // 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 { + if (!proj4) { + 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$1.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$1.ImageOverlay.extend({ + onAdd: function (map) { + this._topLeft = map.getPixelBounds().min; + L$1.ImageOverlay.prototype.onAdd.call(this, map); + }, + _reset: function () { + if (this._map.options.crs === L$1.CRS.EPSG3857) { + L$1.ImageOverlay.prototype._reset.call(this); + } else { + L$1.DomUtil.setPosition(this._image, this._topLeft.subtract(this._map.getPixelOrigin())); + } + } + }); + + var RasterLayer = L$1.Layer.extend({ + options: { + opacity: 1, + position: 'front', + f: 'image', + useCors: cors, + attribution: null, + interactive: false, + alt: '' + }, + + onAdd: function (map) { + // include 'Powered by Esri' in map attribution + setEsriAttribution(map); + + this._update = L$1.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); + } + + // add copyright text listed in service metadata + this.metadata(function (err, metadata) { + if (!err && !this.options.attribution && map.attributionControl && metadata.copyrightText) { + this.options.attribution = metadata.copyrightText; + map.attributionControl.addAttribution(this.getAttribution()); + } + }, 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$1.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; + if (this._currentImage) { + 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; + }, + + redraw: function () { + this._update(); + }, + + _renderImage: function (url, bounds, contentType) { + if (this._map) { + // if no output directory has been specified for a service, MIME data will be returned + if (contentType) { + url = 'data:' + contentType + ';base64,' + url; + } + // 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); + + var onOverlayError = function () { + this._map.removeLayer(image); + this.fire('error'); + image.off('load', onOverlayLoad, this); + }; + + var onOverlayLoad = function (e) { + image.off('error', onOverlayLoad, this); + 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 + }); + }; + + // If loading the image fails + image.once('error', onOverlayError, this); + + // once the image loads + image.once('load', onOverlayLoad, 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) { + if (this._currentImage) { + this._currentImage._map.removeLayer(this._currentImage); + this._currentImage = null; + } + return; + } + + var params = this._buildExportParams(); + + this._requestExport(params, bounds); + }, + + _renderPopup: function (latlng, error, results, response) { + latlng = L$1.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; + }, + + _calculateBbox: function () { + var pixelBounds = this._map.getPixelBounds(); + + var sw = this._map.unproject(pixelBounds.getBottomLeft()); + var ne = this._map.unproject(pixelBounds.getTopRight()); + + var neProjected = this._map.options.crs.project(ne); + var swProjected = this._map.options.crs.project(sw); + + // this ensures ne/sw are switched in polar maps where north/top bottom/south is inverted + var boundsProjected = L$1.bounds(neProjected, swProjected); + + return [boundsProjected.getBottomLeft().x, boundsProjected.getBottomLeft().y, boundsProjected.getTopRight().x, boundsProjected.getTopRight().y].join(','); + }, + + _calculateImageSize: function () { + // ensure that we don't ask ArcGIS Server for a taller image than we have actual map displaying within the div + var bounds = this._map.getPixelBounds(); + var size = this._map.getSize(); + + var sw = this._map.unproject(bounds.getBottomLeft()); + var ne = this._map.unproject(bounds.getTopRight()); + + var top = this._map.latLngToLayerPoint(ne).y; + var bottom = this._map.latLngToLayerPoint(sw).y; + + if (top > 0 || bottom < size.y) { + size.y = bottom - top; + } + + return size.x + ',' + size.y; + } + }); + + 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$1.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$1.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$1.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$1.Util.bind(function (error, results, response) { + if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire + setTimeout(L$1.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 sr = parseInt(this._map.options.crs.code.split(':')[1], 10); + + var params = { + bbox: this._calculateBbox(), + size: this._calculateImageSize(), + 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; + } + + // 0 is falsy *and* a valid input parameter + if (this.options.noData === 0 || 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 + if (this.options.token) { + response.href += ('?token=' + this.options.token); + } + this._renderImage(response.href, bounds); + }, this); + } else { + params.f = 'image'; + this._renderImage(this.options.url + 'exportImage' + L$1.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$1.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$1.Util.bind(function (error, featureCollection, response) { + if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire + setTimeout(L$1.Util.bind(function () { + this._renderPopup(e.latlng, error, featureCollection, response); + }, this), 300); + }, this); + + var identifyRequest = this.identify().on(this._map).at(e.latlng); + + // remove extraneous vertices from response features + identifyRequest.simplify(this._map, 0.5); + + if (this.options.layers) { + identifyRequest.layers('visible:' + this.options.layers.join(',')); + } else { + identifyRequest.layers('visible'); + } + + // if present, pass layer ids and sql filters through to the identify task + if (this.options.layerDefs && typeof this.options.layerDefs !== 'string') { + for (var id in this.options.layerDefs) { + if (this.options.layerDefs.hasOwnProperty(id)) { + identifyRequest.layerDef(id, this.options.layerDefs[id]); + } + } + } + + identifyRequest.run(callback); + + // set the flags to show the popup + this._shouldRenderPopup = true; + this._lastClick = e.latlng; + }, + + _buildExportParams: function () { + var sr = parseInt(this._map.options.crs.code.split(':')[1], 10); + + var params = { + bbox: this._calculateBbox(), + size: this._calculateImageSize(), + 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 = typeof this.options.layerDefs === 'string' ? this.options.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; + } + + if (this.options.proxy) { + params.proxy = this.options.proxy; + } + + // use a timestamp to bust server cache + if (this.options.disableCache) { + params._ts = Date.now(); + } + + 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 + + if (this.options.token) { + response.href += ('?token=' + this.options.token); + } + if (this.options.proxy) { + response.href = this.options.proxy + '?' + response.href; + } + if (response.href) { + this._renderImage(response.href, bounds); + } else { + this._renderImage(response.imageData, bounds, response.contentType); + } + }, this); + } else { + params.f = 'image'; + this._renderImage(this.options.url + 'export' + L$1.Util.getParamString(params), bounds); + } + } + }); + + function dynamicMapLayer (url, options) { + return new DynamicMapLayer(url, options); + } + + var VirtualGrid = L$1__default.Layer.extend({ + + options: { + cellSize: 512, + updateInterval: 150 + }, + + initialize: function (options) { + options = L$1__default.setOptions(this, options); + this._zooming = false; + }, + + onAdd: function (map) { + this._map = map; + this._update = L$1__default.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, + zoomstart: this._zoomstart, + zoomend: this._reset + }; + + return events; + }, + + addTo: function (map) { + map.addLayer(this); + return this; + }, + + removeFrom: function (map) { + map.removeLayer(this); + return this; + }, + + _zoomstart: function () { + this._zooming = true; + }, + + _reset: function () { + 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._map) { + return; + } + + var bounds = this._map.getPixelBounds(); + var cellSize = this._getCellSize(); + + // cell coordinates range for the current view + var cellBounds = L$1__default.bounds( + bounds.min.divideBy(cellSize).floor(), + bounds.max.divideBy(cellSize).floor()); + + this._removeOtherCells(cellBounds); + this._addCells(cellBounds); + + this.fire('cellsupdated'); + }, + + _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$1__default.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$1__default.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$1__default.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$1__default.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$1__default.Util.wrapNum(coords.x, this._wrapLng) : coords.x; + coords.y = this._wrapLat ? L$1__default.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$1__default.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$1.Util.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) { + // include 'Powered by Esri' in map attribution + setEsriAttribution(map); + + this.service.metadata(function (err, metadata) { + if (!err) { + var supportedFormats = metadata.supportedQueryFormats; + + // Check if someone has requested that we don't use geoJSON, even if it's available + var forceJsonFormat = false; + if (this.service.options.isModern === false) { + forceJsonFormat = true; + } + + // Unless we've been told otherwise, check to see whether service can emit GeoJSON natively + if (!forceJsonFormat && supportedFormats && supportedFormats.indexOf('geoJSON') !== -1) { + this.service.options.isModern = true; + } + + // add copyright text listed in service metadata + if (!this.options.attribution && map.attributionControl && metadata.copyrightText) { + this.options.attribution = metadata.copyrightText; + map.attributionControl.addAttribution(this.getAttribution()); + } + } + }, this); + + 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) { + // dont fetch features outside the scale range defined for the layer + if (this._visibleZoom()) { + 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$1.Util.requestAnimFrame(L$1.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) { + // deincrement 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; + + if (this._currentSnapshot.indexOf(id) === -1) { + this._currentSnapshot.push(id); + } + if (this._cache[key].indexOf(id) === -1) { + this._cache[key].push(id); + } + } + + if (this.options.timeField) { + this._buildTimeIndexes(features); + } + + 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$1.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._visibleZoom()) { + this._currentSnapshot = newSnapshot; + // schedule adding features for the next animation frame + L$1.Util.requestAnimFrame(L$1.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$1.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$1.Util.requestAnimFrame(L$1.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$1.Util.bind(function (error, response) { + this._metadata = response; + callback(error, this._metadata); + }, this)); + } + }, + + addFeature: function (feature, callback, context) { + this._getMetadata(L$1.Util.bind(function (error, metadata) { + if (error) { + if (callback) { callback.call(this, error, null); } + return; + } + + this.service.addFeature(feature, L$1.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]); + // trigger the event when the entire featureLayer is removed from the map + this.fire('removefeature', { + feature: this._layers[i].feature, + permanent: false + }, true); + } + + return FeatureManager.prototype.onRemove.call(this, map); + }, + + createNewLayer: function (geojson) { + var layer = L$1.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$1.GeoJSON.coordsToLatLng; + + // copy new attributes, if present + if (geojson.properties) { + layer.feature.properties = geojson.properties; + } + + switch (geojson.geometry.type) { + case 'Point': + latlngs = L$1.GeoJSON.coordsToLatLng(geojson.geometry.coordinates); + layer.setLatLng(latlngs); + break; + case 'LineString': + latlngs = L$1.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 0, coordsToLatLng); + layer.setLatLngs(latlngs); + break; + case 'MultiLineString': + latlngs = L$1.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng); + layer.setLatLngs(latlngs); + break; + case 'Polygon': + latlngs = L$1.GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng); + layer.setLatLngs(latlngs); + break; + case 'MultiPolygon': + latlngs = L$1.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); + this.fire('addfeature', { + feature: layer.feature + }, true); + } + + // 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._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._visibleZoom() && !this._zooming && this._map) { + L$1.Util.requestAnimFrame(L$1.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$1.Util.requestAnimFrame(L$1.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$1.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 + */ + + eachActiveFeature: function (fn, context) { + // figure out (roughly) which layers are in view + if (this._map) { + var activeBounds = this._map.getBounds(); + for (var i in this._layers) { + if (this._currentSnapshot.indexOf(this._layers[i].feature.id) !== -1) { + // a simple point in poly test for point geometries + if (typeof this._layers[i].getLatLng === 'function' && activeBounds.contains(this._layers[i].getLatLng())) { + fn.call(context, this._layers[i]); + } else if (typeof this._layers[i].getBounds === 'function' && activeBounds.intersects(this._layers[i].getBounds())) { + // intersecting bounds check for polyline and polygon geometries + fn.call(context, this._layers[i]); + } + } + } + } + return this; + }, + + 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$1.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$1.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.options = options; + exports.Util = EsriUtil; + 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNyaS1sZWFmbGV0LWRlYnVnLmpzIiwic291cmNlcyI6WyIuLi9wYWNrYWdlLmpzb24iLCIuLi9zcmMvU3VwcG9ydC5qcyIsIi4uL3NyYy9PcHRpb25zLmpzIiwiLi4vc3JjL1JlcXVlc3QuanMiLCIuLi9ub2RlX21vZHVsZXMvYXJjZ2lzLXRvLWdlb2pzb24tdXRpbHMvaW5kZXguanMiLCIuLi9zcmMvVXRpbC5qcyIsIi4uL3NyYy9UYXNrcy9UYXNrLmpzIiwiLi4vc3JjL1Rhc2tzL1F1ZXJ5LmpzIiwiLi4vc3JjL1Rhc2tzL0Zpb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luZGlhLCAmY29weTsgT3BlblN0cmVldE1hcCBjb250cmlidXRvcnMnXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBEYXJrR3JheUxhYmVsczoge1xuICAgICAgICB1cmxUZW1wbGF0ZTogdGlsZVByb3RvY29sICsgJy8ve3N9LmFyY2dpc29ubGluZS5jb20vQXJjR0lTL3Jlc3Qvc2VydmljZXMvQ2FudmFzL1dvcmxkX0RhcmtfR3JheV9SZWZlcmVuY2UvTWFwU2VydmVyL3RpbGUve3p9L3t5fS97eH0nLFxuICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgbWluWm9vbTogMSxcbiAgICAgICAgICBtYXhab29tOiAxNixcbiAgICAgICAgICBzdWJkb21haW5zOiBbJ3NlcnZlcicsICdzZXJ2aWNlcyddLFxuICAgICAgICAgIHBhbmU6IChwb2ludGVyRXZlbnRzKSA/ICdlc3JpLWxhYmVscycgOiAndGlsZVBhbmUnLFxuICAgICAgICAgIGF0dHJpYnV0aW9uOiAnJ1xuXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBHcmF5OiB7XG4gICAgICAgIHVybFRlbXBsYXRlOiB0aWxlUHJvdG9jb2wgKyAnLy97c30uYXJjZ2lzb25saW5lLmNvbS9BcmNHSVMvcmVzdC9zZXJ2aWNlcy9DYW52YXMvV29ybGRfTGlnaHRfR3JheV9CYXNlL01hcFNlcnZlci90aWxlL3t6fS97eX0ve3h9JyxcbiAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgIG1pblpvb206IDEsXG4gICAgICAgICAgbWF4Wm9vbTogMTYsXG4gICAgICAgICAgc3ViZG9tYWluczogWydzZXJ2ZXInLCAnc2VydmljZXMnXSxcbiAgICAgICAgICBhdHRyaWJ1dGlvbjogJ0hFUkUsIERlTG9ybWUsIE1hcG15SW5kaWEsICZjb3B5OyBPcGVuU3RyZWV0TWFwIGNvbnRyaWJ1dG9ycydcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIEdyYXlMYW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nZpY2VzL1dvcmxkX1NoYWRlZF9SZWxpZWYvTWFwU2VydmVyL3RpbGUve3p9L3t5fS97eH0nLFxuICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgbWluWm9vbTogMSxcbiAgICAgICAgICBtYXhab29tOiAxMyxcbiAgICAgICAgICBzdWJkb21haW5zOiBbJ3NlcnZlcicsICdzZXJ2aWNlcyddLFxuICAgICAgICAgIGF0dHJpYnV0aW9uOiAnVVNHUydcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIFNoYWRlZFJlbGllZkxhYmVsczoge1xuICAgICAgICB1cmxUZW1wbGF0ZTogdGlsZVByb3RvY29sICsgJy8ve3N9LmFyY2dpc29ubGluZS5jb20vQXJjR0lTL3Jlc3Qvc2VydmljZXMvUmVmZXJlbmNlL1dvcmxkX0JvdW5kYXJpZXNfYW5kX1BsYWNlc19BbHRlcm5hdGUvTWFwU2VydmVyL3RpbGUve3p9L3t5fS97eH0nLFxuICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgbWluWm9vbTogMSxcbiAgICAgICAgICBtYXhab29tOiAxMixcbiAgICAgICAgICBzdWJkb21haW5zOiBbJ3NlcnZlcicsICdzZXJ2aWNlcyddLFxuICAgICAgICAgIHBhbmU6IChwb2ludGVyRXZlbnRzKSA/ICdlc3JpLWxhYmVscycgOiAndGlsZVBhbmUnLFxuICAgICAgICAgIGF0dHJpYnV0aW9uOiAnJ1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgVGVycmFpbjoge1xuICAgICAgICB1cmxUZW1wbGF0ZTogdGlsZVByb3RvY29sICsgJy8ve3N9LmFyY2dpc29ubGluZS5jb20vQXJjR0lTL3Jlc3Qvc2VydmljZXMvV29ybGRfVGVycmFpbl9CYXNlL01hcFNlcnZlci90aWxlL3t6fS97eX0ve3h9JyxcbiAgICAgICAgb3B0aW9uczoge1xuICAgICAgICAgIG1pblpvb206IDEsXG4gICAgICAgICAgbWF4Wm9vbTogMTMsXG4gICAgICAgICAgc3ViZG9tYWluczogWydzZXJ2ZXInLCAnc2VydmljZXMnXSxcbiAgICAgICAgICBhdHRyaWJ1dGlvbjogJ1VTR1MsIE5PQUEnXG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBUZXJyYWluTGFiZWxzOiB7XG4gICAgICAgIHVybFRlbXBsYXRlOiB0aWxlUHJvdG9jb2wgKyAnLy97c30uYXJjZ2lzb25saW5lLmNvbS9BcmNHSVMvcmVzdC9zZXJ2aWNlcy9SZWZlcmVuY2UvV29ybGRfUmVmZXJlbmNlX092ZXJsYXkvTWFwU2VydmVyL3RpbGUve3p9L3t5fS97eH0nLFxuICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgbWluWm9vbTogMSxcbiAgICAgICAgICBtYXhab29tOiAxMyxcbiAgICAgICAgICBzdWJkb21haW5zOiBbJ3NlcnZlcicsICdzZXJ2aWNlcyddLFxuICAgICAgICAgIHBhbmU6IChwb2ludGVyRXZlbnRzKSA/ICdlc3JpLWxhYmVscycgOiAndGlsZVBhbmUnLFxuICAgICAgICAgIGF0dHJpYnV0aW9uOiAnJ1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgVVNBVG9wbzoge1xuICAgICAgICB1cmxUZW1wbGF0ZTogdGlsZVByb3RvY29sICsgJy8ve3N9LmFyY2dpc29ubGluZS5jb20vQXJjR0lTL3Jlc3Qvc2VydmljZXMvVVNBX1RvcG9fTWFwcy9NYXBTZXJ2ZXIvdGlsZS97en0ve3l9L3t4fScsXG4gICAgICAgIG9wdGlvbnM6IHtcbiAgICAgICAgICBtaW5ab29tOiAxLFxuICAgICAgICAgIG1heFpvb206IDE1LFxuICAgICAgICAgIHN1YmRvbWFpbnM6IFsnc2VydmVyJywgJ3NlcnZpY2VzJ10sXG4gICAgICAgICAgYXR0cmlidXRpb246ICdVU0dTLCBOYXRpb25hbCBHZW9ncmFwaGljIFNvY2lldHksIGktY3ViZWQnXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG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lsZUluZm8ubG9kcztcbiAgICAgICAgICAgIHZhciBjb3JyZWN0UmVzb2x1dGlvbnMgPSBUaWxlZE1hcExheWVyLk1lcmNhdG9yWm9vbUxldmVscztcblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmNnaXNMT0RzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgIHZhciBhcmNnaXNMT0QgPSBhcmNnaXNMT0RzW2ldO1xuICAgICAgICAgICAgICBmb3IgKHZhciBjaSBpbiBjb3JyZWN0UmVzb2x1dGlvbnMpIHtcbiAgICAgICAgICAgICAgICB2YXIgY29ycmVjdFJlcyA9IGNvcnJlY3RSZXNvbHV0aW9uc1tjaV07XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5fd2l0aGluUGVyY2VudGFnZShhcmNnaXNMT0QucmVzb2x1dGlvbiwgY29ycmVjdFJlcywgdGhpcy5vcHRpb25zLnpvb21PZmZzZXRBbGxvd2FuY2UpKSB7XG4gICAgICAgICAgICAgICAgICB0aGlzLl9sb2RNYXBbY2ldID0gYXJjZ2lzTE9ELmxldmVsO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuZmlyZSgnbG9kbWFwJyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICghcHJvajQpIHtcbiAgICAgICAgICAgICAgd2FybignTC5lc3JpLlRpbGVkTWFwTGF5ZXIgaXMgdXNpbmcgYSBub24tbWVyY2F0b3Igc3BhdGlhbCByZWZlcmVuY2UuIFN1cHBvcnQgbWF5IGJlIGF2YWlsYWJsZSB0aHJvdWdoIFByb2o0TGVhZmxldCBodHRwOi8vZXNyaS5naXRodWIuaW8vZXNyaS1sZWFmbGV0L2V4YW1wbGVzL25vbi1tZXJjYXRvci1wcm9qZWN0aW9uLmh0bWwnKTtcbiAgICA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B0aGlzLl9jdXJyZW50SW1hZ2UgPSBuZXdJbWFnZTtcblxuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5wb3NpdGlvbiA9PT0gJ2Zyb250Jykge1xuICAgICAgICAgICAgICB0aGlzLmJyaW5nVG9Gcm9udCgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhpcy5icmluZ1RvQmFjaygpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5fbWFwICYmIHRoaXMuX2N1cnJlbnRJbWFnZS5fbWFwKSB7XG4gICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbWFnZS5zZXRPcGFjaXR5KHRoaXMub3B0aW9ucy5vcGFjaXR5KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbWFnZS5fbWFwLnJlbW92ZUxheWVyKHRoaXMuX2N1cnJlbnRJbWFnZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChvbGRJbWFnZSAmJiB0aGlzLl9tYXApIHtcbiAgICAgICAgICAgICAgdGhpcy5fbWFwLnJlbW92ZUxheWVyKG9sZEltYWdlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKG9sZEltYWdlICYmIG9sZEltYWdlLl9tYXApIHtcbiAgICAgICAgICAgICAgb2xkSW1hZ2UuX21hcC5yZW1vdmVMYXllcihvbGRJbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuX21hcC5yZW1vdmVMYXllcihuZXdJbWFnZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5maXJlKCdsb2FkJywge1xuICAgICAgICAgIGJvdW5kczogYm91bmRzXG4gICAgICAgIH0pO1xuICAgICAgfTtcblxuICAgICAgLy8gSWYgbG9hZGluZyB0aGUgaW1hZ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Bmb3IgKHZhciBpID0gMDsgaSA8IGxheWVycy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICB2YXIgbGF5ZXIgPSB0aGlzLl9sYXllcnNbbGF5ZXJzW2ldXTtcbiAgICAgICAgICAgICAgaWYgKGxheWVyICYmIGxheWVyLmdldEJvdW5kcyAmJiBtYXBCb3VuZHMuaW50ZXJzZWN0cyhsYXllci5nZXRCb3VuZHMoKSkpIHtcbiAgICAgICAgICAgICAgICByZW1vdmFibGUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocmVtb3ZhYmxlKSB7XG4gICAgICAgICAgICAgIHRoaXMucmVtb3ZlTGF5ZXJzKGxheWVycywgIXRoaXMub3B0aW9ucy5jYWNoZUxheWVycyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghdGhpcy5vcHRpb25zLmNhY2hlTGF5ZXJzICYmIHJlbW92YWJsZSkge1xuICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fY2FjaGVbY2FjaGVLZXldO1xuICAgICAgICAgICAgICBkZWxldGUgdGhpcy5fY2VsbHNbY2VsbEtleV07XG4gICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLl9hY3RpdmVDZWxsc1tjZWxsS2V5XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0sIHRoaXMpKTtcbiAgICB9XG4gIH0sXG5cbiAgLyoqXG4gICAqIFN0eWxpbmcgTWV0aG9kc1xuICAgKi9cblxuICByZXNldFN0eWxlOiBmdW5jdGlvbiAoKSB7XG4gICAgdGhpcy5vcHRpb25zLnN0eWxlID0gdGhpcy5fb3JpZ2luYWxTdHlsZTtcbiAgICB0aGlzLmVhY2hGZWF0dXJlKGZ1bmN0aW9uIChsYXllcikge1xuICAgICAgdGhpcy5yZXNldEZlYXR1cmVTdHlsZShsYXllci5mZWF0dXJlLmlkKTtcbiAgIC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QUFDLE9BQU8sQ0FBQyxZQUFZLENBQUMsT0FBTyxFQUFFQSxVQUFNLENBQUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLEVBQUUsT0FBTyxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ2xJLENBQUEsTUFBTSxJQUFJLFlBQVksR0FBRyxRQUFRLENBQUMsT0FBTyxDQUFDO0FBQzFDLENBQUEsTUFBTSxJQUFJLENBQUMsZUFBZSxDQUFDLE9BQU8sQ0FBQyxFQUFFLEVBQUUsWUFBWSxDQUFDLENBQUM7QUFDckQsQ0FBQSxLQUFLOztBQUVMLENBQUE7QUFDQSxDQUFBLElBQUksSUFBSSxLQUFLLElBQUksS0FBSyxDQUFDLFFBQVEsSUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssRUFBRTtBQUN2RCxDQUFBLE1BQU0sSUFBSSxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUM7QUFDbEMsQ0FBQSxLQUFLO0FBQ0wsQ0FBQSxHQUFHO0FBQ0gsQ0FBQSxDQUFDLENBQUMsQ0FBQzs7QUFFSCxDQUFPLFNBQVMsWUFBWSxFQUFFLE9BQU8sRUFBRTtBQUN2QyxDQUFBLEVBQUUsT0FBTyxJQUFJLFlBQVksQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNuQyxDQUFBLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ== \ No newline at end of file diff --git a/dist/esri-leaflet.js b/dist/esri-leaflet.js new file mode 100644 index 000000000..1ddbd0d97 --- /dev/null +++ b/dist/esri-leaflet.js @@ -0,0 +1,6 @@ +/* esri-leaflet - v2.1.0 - Thu Jul 27 2017 14:41:38 GMT-0700 (PDT) + * Copyright (c) 2017 Environmental Systems Research Institute, Inc. + * Apache-2.0 */ +!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){var e="";t.f=t.f||"json";for(var i in t)if(t.hasOwnProperty(i)){var s,r=t[i],n=Object.prototype.toString.call(r);e.length&&(e+="&"),s="[object Array]"===n?"[object Object]"===Object.prototype.toString.call(r[0])?JSON.stringify(r):r.join(","):"[object Object]"===n?JSON.stringify(r):"[object Date]"===n?r.valueOf():r,e+=encodeURIComponent(i)+"="+encodeURIComponent(s)}return e}function s(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,n;if(4===s.readyState){try{r=JSON.parse(s.responseText)}catch(t){r=null,n={code:500,message:"Could not parse response as JSON. This could also be caused by a CORS or XMLHttpRequest error."}}!n&&r.error&&(n=r.error,r=null),s.onerror=e.Util.falseFn,t.call(i,n,r)}},s.ontimeout=function(){this.onerror()},s}function r(t,e,r,n){var o=s(r,n);return o.open("POST",t),void 0!==n&&null!==n&&void 0!==n.options&&(o.timeout=n.options.timeout),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(i(e)),o}function n(t,e,r,n){var o=s(r,n);return o.open("GET",t+"?"+i(e),!0),void 0!==n&&null!==n&&void 0!==n.options&&(o.timeout=n.options.timeout),o.send(null),o}function o(t,e,r,n){var o=i(e),u=s(r,n),l=(t+"?"+o).length;if(l<=2e3&&it.cors?u.open("GET",t+"?"+o):l>2e3&&it.cors&&(u.open("POST",t),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded")),void 0!==n&&null!==n&&void 0!==n.options&&(u.timeout=n.options.timeout),l<=2e3&&it.cors)u.send(null);else{if(!(l>2e3&&it.cors))return l<=2e3&&!it.cors?a(t,e,r,n):void P("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");u.send(o)}return u}function a(t,s,r,n){window._EsriLeafletCallbacks=window._EsriLeafletCallbacks||{};var o="c"+rt;s.callback="window._EsriLeafletCallbacks."+o,window._EsriLeafletCallbacks[o]=function(t){if(!0!==window._EsriLeafletCallbacks[o]){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),r.call(n,e,t),window._EsriLeafletCallbacks[o]=!0}};var a=e.DomUtil.create("script",null,document.body);return a.type="text/javascript",a.src=t+"?"+i(s),a.id=o,rt++,{id:o,url:a.src,abort:function(){window._EsriLeafletCallbacks._callback[o]({code:0,message:"Request aborted."})}}}function u(t,e){for(var i=0;i=0}function c(t,e,i,s){var r=(s[0]-i[0])*(t[1]-i[1])-(s[1]-i[1])*(t[0]-i[0]),n=(e[0]-t[0])*(t[1]-i[1])-(e[1]-t[1])*(t[0]-i[0]),o=(s[1]-i[1])*(e[0]-t[0])-(s[0]-i[0])*(e[1]-t[1]);if(0!==o){var a=r/o,u=n/o;if(a>=0&&a<=1&&u>=0&&u<=1)return!0}return!1}function p(t,e){for(var i=0;i=0;e--)if(i=r[e][0],m(i,s)){r[e].push(s),d=!0;break}d||c.push(s)}for(;c.length;){s=c.pop();var f=!1;for(e=r.length-1;e>=0;e--)if(i=r[e][0],p(i,s)){r[e].push(s),f=!0;break}f||r.push([s.reverse()])}return 1===r.length?{type:"Polygon",coordinates:r[0]}:{type:"MultiPolygon",coordinates:r}}function y(t){var e=[],i=t.slice(0),s=l(i.shift().slice(0));if(s.length>=4){h(s)||s.reverse(),e.push(s);for(var r=0;r=4&&(h(n)&&n.reverse(),e.push(n))}}return e}function g(t){for(var e=[],i=0;i=0;r--){var n=s[r].slice(0);e.push(n)}return e}function _(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function v(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=f(t.rings.slice(0))),(t.geometry||t.attributes)&&(i.type="Feature",i.geometry=t.geometry?v(t.geometry):null,i.properties=t.attributes?_(t.attributes):null,t.attributes&&(i.id=t.attributes[e]||t.attributes.OBJECTID||t.attributes.FID)),i}function b(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=y(t.coordinates.slice(0)),r.spatialReference=s;break;case"MultiPolygon":r.rings=g(t.coordinates.slice(0)),r.spatialReference=s;break;case"Feature":t.geometry&&(r.geometry=b(t.geometry,e)),r.attributes=t.properties?_(t.properties):{},t.id&&(r.attributes[e]=t.id);break;case"FeatureCollection":for(r=[],i=0;i=0;u--){var l=S(s[u],i);a.features.push(l)}return a}function R(t){return t=e.Util.trim(t),"/"!==t[t.length-1]&&(t+="/"),t}function C(t){return/^(?!.*utility\.arcgis\.com).*\.arcgis\.com.*FeatureServer/i.test(t)}function O(t){var e;switch(t){case"Point":e="esriGeometryPoint";break;case"MultiPoint":e="esriGeometryMultipoint";break;case"LineString":case"MultiLineString":e="esriGeometryPolyline";break;case"Polygon":case"MultiPolygon":e="esriGeometryPolygon"}return e}function P(){console&&console.warn&&console.warn.apply(console,arguments)}function F(t){return t.getSize().x-st.attributionWidthOffset+"px"}function k(t){if(t.attributionControl&&!t.attributionControl._esriAttributionAdded){t.attributionControl.setPrefix('Leaflet | Powered by Esri');var i=document.createElement("style");i.type="text/css",i.innerHTML=".esri-truncated-attribution:hover {white-space: normal;}",document.getElementsByTagName("head")[0].appendChild(i),e.DomUtil.addClass(t.attributionControl._container,"esri-truncated-attribution:hover");var s=document.createElement("style");s.type="text/css",s.innerHTML=".esri-truncated-attribution {vertical-align: -3px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: inline-block;transition: 0s white-space;transition-delay: 1s;max-width: "+F(t)+";}",document.getElementsByTagName("head")[0].appendChild(s),e.DomUtil.addClass(t.attributionControl._container,"esri-truncated-attribution"),t.on("resize",function(e){t.attributionControl._container.style.maxWidth=F(e.target)}),t.attributionControl._esriAttributionAdded=!0}}function M(t){var i={geometry:null,geometryType:null};return t instanceof e.LatLngBounds?(i.geometry=I(t),i.geometryType="esriGeometryEnvelope",i):(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,i.geometry=x(t),i.geometryType=O(t.type)),t.toGeoJSON&&(t=t.toGeoJSON()),"Feature"===t.type&&(t=t.geometry),"Point"===t.type||"LineString"===t.type||"Polygon"===t.type||"MultiPolygon"===t.type?(i.geometry=x(t),i.geometryType=O(t.type),i):void P("invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object"))}function G(t,i){a(t,{},e.Util.bind(function(t,s){if(!t){i._esriAttributions=[];for(var r=0;r=l.minZoom&&a<=l.maxZoom&&(r+=", "+h)}r=r.substr(2);var c=i.attributionControl._container.querySelector(".esri-dynamic-attribution");c.innerHTML=r,c.style.maxWidth=F(i),i.fire("attributionupdated",{attribution:r})}}function q(t){return new ut(t)}function D(t){return new lt(t)}function B(t){return new ht(t)}function E(t){return new ct(t)}function z(t){return new pt(t)}function N(t){return new dt(t)}function j(t){return new mt(t)}function Z(t){return new ft(t)}function W(t){return new yt(t)}function J(t){return new gt(t)}function Q(t,e){return new vt(t,e)}function H(t,e){return new bt(t,e)}function V(t,e){return new St(t,e)}function K(t,e){return new At(t,e)}function X(t){this.values=[].concat(t||[])}function $(t){return new wt(t)}var Y="default"in e?e.default:e,tt=window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest,et=""===document.documentElement.style.pointerEvents,it={cors:tt,pointerEvents:et},st={attributionWidthOffset:55},rt=0,nt=it.cors?n:a;nt.CORS=n,nt.JSONP=a;var ot={request:o,get:nt,post:r},at={shallowClone:A,warn:P,cleanUrl:R,isArcgisOnline:C,geojsonTypeToArcGIS:O,responseToFeatureCollection:w,geojsonToArcGIS:x,arcgisToGeoJSON:S,boundsToExtent:I,extentToBounds:T,calcAttributionWidth:F,setEsriAttribution:k,_setGeometry:M,_getAttributionData:G,_updateMapAttribution:U},ut=e.Class.extend({options:{proxy:!1,useCors:tt},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=R(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},format:function(t){return this.params.returnUnformattedValues=!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 n=this.options.proxy?this.options.proxy+"?"+this.options.url+e:this.options.url+e;return"get"!==t&&"request"!==t||this.options.useCors?ot[t](n,i,s,r):ot.get.JSONP(n,i,s,r)}}),lt=ut.extend({setters:{offset:"resultOffset",limit:"resultRecordCount",fields:"outFields",precision:"geometryPrecision",featureIds:"objectIds",returnGeometry:"returnGeometry",transform:"datumTransformation",token:"token"},path:"query",params:{returnGeometry:!0,where:"1=1",outSr:4326,outFields:"*"},within:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelContains",this},intersects:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelIntersects",this},contains:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelWithin",this},crosses:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelCrosses",this},touches:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelTouches",this},overlaps:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelOverlaps",this},bboxIntersects:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelEnvelopeIntersects",this},indexIntersects:function(t){return this._setGeometryParams(t),this.params.spatialRel="esriSpatialRelIndexIntersects",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(),this.options.isModern||C(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&&w(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){s&&s.extent&&T(s.extent)?t.call(e,i,T(s.extent),s):(i={message:"Invalid Bounds"},t.call(e,i,null,s))},e)},pixelSize:function(t){var i=e.point(t);return this.params.pixelSize=[i.x,i.y],this},layer:function(t){return this.path=t+"/query",this},_trapSQLerrors:function(t){t&&"400"===t.code&&P("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},_setGeometryParams:function(t){this.params.inSr=4326;var e=M(t);this.params.geometry=e.geometry,this.params.geometryType=e.geometryType}}),ht=ut.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&&w(s),s)},e)}}),ct=ut.extend({path:"identify",between:function(t,e){return this.params.time=[t.valueOf(),e.valueOf()],this}}),pt=ct.extend({setters:{layers:"layers",precision:"geometryPrecision",tolerance:"tolerance",returnGeometry:"returnGeometry"},params:{sr:4326,layers:"all",tolerance:3,returnGeometry:!0},on:function(t){var e=I(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 2===t.length&&(t=e.latLng(t)),this._setGeometryParams(t),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*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=w(s);s.results=s.results.reverse();for(var n=0;n=0;n--)r.catalogItems.features[n].properties.catalogItemVisibility=s[n];return r}}),mt=e.Evented.extend({options:{proxy:!1,useCors:tt,timeout:0},initialize:function(t){t=t||{},this._requestQueue=[],this._authenticating=!1,e.Util.setOptions(this,t),this.options.url=R(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 n=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 o=this.options.proxy?this.options.proxy+"?"+this.options.url+e:this.options.url+e;return"get"!==t&&"request"!==t||this.options.useCors?ot[t](o,i,n,r):ot.get.JSONP(o,i,n,r)},_createServiceCallback:function(t,i,s,r,n){return e.Util.bind(function(o,a){!o||499!==o.code&&498!==o.code||(this._authenticating=!0,this._requestQueue.push([t,i,s,r,n]),this.fire("authenticationrequired",{authenticate:e.Util.bind(this.authenticate,this)},!0),o.authenticate=e.Util.bind(this.authenticate,this)),r.call(n,o,a),o?this.fire("requesterror",{url:this.options.url+i,params:s,message:o.message,code:o.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];this[e.shift()].apply(this,e)}this._requestQueue=[]}}),ft=mt.extend({identify:function(){return z(this)},find:function(){return B(this)},query:function(){return D(this)}}),yt=mt.extend({query:function(){return D(this)},identify:function(){return N(this)}}),gt=mt.extend({options:{idAttribute:"OBJECTID"},query:function(){return D(this)},addFeature:function(t,e,i){return delete t.id,t=x(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=x(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)}}),_t="https:"!==window.location.protocol?"http:":"https:",vt=e.TileLayer.extend({statics:{TILES:{Streets:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/World_Street_Map"}},Topographic:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/World_Topo_Map"}},Oceans:{urlTemplate:_t+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"USGS, NOAA",attributionUrl:"https://static.arcgis.com/attribution/Ocean_Basemap"}},OceansLabels:{urlTemplate:_t+"//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:et?"esri-labels":"tilePane"}},NationalGeographic:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"National Geographic, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp."}},DarkGray:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors"}},DarkGrayLabels:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:et?"esri-labels":"tilePane",attribution:""}},Gray:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],attribution:"HERE, DeLorme, MapmyIndia, © OpenStreetMap contributors"}},GrayLabels:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:16,subdomains:["server","services"],pane:et?"esri-labels":"tilePane",attribution:""}},Imagery:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],attribution:"DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community"}},ImageryLabels:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],pane:et?"esri-labels":"tilePane",attribution:""}},ImageryTransportation:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:19,subdomains:["server","services"],pane:et?"esri-labels":"tilePane"}},ShadedRelief:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"USGS"}},ShadedReliefLabels:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:12,subdomains:["server","services"],pane:et?"esri-labels":"tilePane",attribution:""}},Terrain:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:13,subdomains:["server","services"],attribution:"USGS, NOAA"}},TerrainLabels:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:13,subdomains:["server","services"],pane:et?"esri-labels":"tilePane",attribution:""}},USATopo:{urlTemplate:_t+"//{s}.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}",options:{minZoom:1,maxZoom:15,subdomains:["server","services"],attribution:"USGS, National Geographic Society, i-cubed"}}}},initialize:function(t,i){var s;if("object"==typeof t&&t.urlTemplate&&t.options)s=t;else{if("string"!=typeof t||!vt.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", "TerrainLabels" or "USATopo"');s=vt.TILES[t]}var r=e.Util.extend(s.options,i);e.Util.setOptions(this,r),this.options.token&&(s.urlTemplate+="?token="+this.options.token),e.TileLayer.prototype.initialize.call(this,s.urlTemplate,r)},onAdd:function(t){k(t),"esri-labels"===this.options.pane&&this._initPane(),this.options.attributionUrl&&G(this.options.attributionUrl,t),t.on("moveend",U),e.TileLayer.prototype.onAdd.call(this,t)},onRemove:function(t){t.off("moveend",U),e.TileLayer.prototype.onRemove.call(this,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}},getAttribution:function(){if(this.options.attribution)var t=''+this.options.attribution+"";return t}}),bt=e.TileLayer.extend({options:{zoomOffsetAllowance:.1,errorTileUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEABAMAAACuXLVVAAAAA1BMVEUzNDVszlHHAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7waBAAABw08RwAAAAABJRU5ErkJggg=="},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=R(t.url),t=e.Util.setOptions(this,t),this.tileUrl=t.url+"tile/{z}/{y}/{x}",this.service=Z(t),this.service.addEventParent(this),new RegExp(/tiles.arcgis(online)?\.com/g).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){var i=this._getZoomForUrl();return e.Util.template(this.tileUrl,e.Util.extend({s:this._getSubdomain(t),x:t.x,y:t.y,z:this._lodMap&&this._lodMap[i]?this._lodMap[i]:i},this.options))},createTile:function(t,e){var i=document.createElement("img");return L.DomEvent.on(i,"load",L.bind(this._tileOnLoad,this,e,i)),L.DomEvent.on(i,"error",L.bind(this._tileOnError,this,e,i)),this.options.crossOrigin&&(i.crossOrigin=""),i.alt="",!this._lodMap||this._lodMap&&this._lodMap[this._getZoomForUrl()]?i.src=this.getTileUrl(t):this.once("lodmap",function(){i.src=this.getTileUrl(t)},this),i},onAdd:function(t){k(t),this._lodMap||this.metadata(function(e,i){if(!e&&i.spatialReference){var s=i.spatialReference.latestWkid||i.spatialReference.wkid;if(!this.options.attribution&&t.attributionControl&&i.copyrightText&&(this.options.attribution=i.copyrightText,t.attributionControl.addAttribution(this.getAttribution())),t.options.crs===L.CRS.EPSG3857&&102100===s||3857===s){this._lodMap={};for(var r=i.tileInfo.lods,n=bt.MercatorZoomLevels,o=0;othis.options.maxZoom||t0||ni.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var s=this._cellCoordsToBounds(t);return Y.latLngBounds(this.options.bounds).intersects(s)},_cellCoordsToBounds:function(t){var e=this._map,i=this.options.cellSize,s=t.multiplyBy(i),r=s.add([i,i]),n=e.wrapLatLng(e.unproject(s,t.z)),o=e.wrapLatLng(e.unproject(r,t.z));return Y.latLngBounds(n,o)},_cellCoordsToKey:function(t){return t.x+":"+t.y},_keyToCellCoords:function(t){var e=t.split(":"),i=parseInt(e[0],10),s=parseInt(e[1],10);return Y.point(i,s)},_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?Y.Util.wrapNum(t.x,this._wrapLng):t.x,t.y=this._wrapLat?Y.Util.wrapNum(t.y,this._wrapLat):t.y},_getCellNumBounds:function(){var t=this._map.getPixelWorldBounds(),e=this._getCellSize();return t?Y.bounds(t.min.divideBy(e).floor(),t.max.divideBy(e).ceil().subtract([1,1])):null}});X.prototype.query=function(t){var e=this.getIndex(t);return this.values[e]},X.prototype.getIndex=function(t){this.dirty&&this.sort();for(var e,i,s=0,r=this.values.length-1;s<=r;)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)},X.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)},X.prototype.insert=function(t){return this.values.splice(this.getIndex(t.value),0,t),this},X.prototype.bulkAdd=function(t,e){return this.values=this.values.concat([].concat(t||[])),e?this.sort():this.dirty=!0,this},X.prototype.sort=function(){return this.values.sort(function(t,e){return+e.value-+t.value}).reverse(),this.dirty=!1,this};var It=Tt.extend({options:{attribution:null,where:"1=1",fields:["*"],from:!1,to:!1,timeField:!1,timeFilterMode:"server",simplifyFactor:0,precision:6},initialize:function(t){if(Tt.prototype.initialize.call(this,t),t.url=R(t.url),t=e.Util.setOptions(this,t),this.service=J(t),this.service.addEventParent(this),"*"!==this.options.fields[0]){for(var i=!1,s=0;s=0;s--){var r=t[s].id;-1===this._currentSnapshot.indexOf(r)&&this._currentSnapshot.push(r),-1===this._cache[i].indexOf(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=[],n=[],o=0,a=null,u=e.Util.bind(function(t,u){if(t&&(a=t),u)for(var l=u.features.length-1;l>=0;l--)n.push(u.features[l].id);--o<=0&&this._visibleZoom()&&(this._currentSnapshot=n,e.Util.requestAnimFrame(e.Util.bind(function(){this.removeLayers(r),this.addLayers(n),i&&i.call(s,a)},this)))},this),l=this._currentSnapshot.length-1;l>=0;l--)r.push(this._currentSnapshot[l]);for(var h in this._activeCells){o++;var c=this._keyToCellCoords(h),p=this._cellCoordsToBounds(c);this._requestFeatures(p,h,u)}return this},getWhere:function(){return this.options.where},getTimeRange:function(){return[this.options.from,this.options.to]},setTimeRange:function(t,i,s,r){var n=this.options.from,o=this.options.to,a=0,u=null,l=e.Util.bind(function(e){e&&(u=e),this._filterExistingFeatures(n,o,t,i),a--,s&&a<=0&&s.call(r,u)},this);if(this.options.from=t,this.options.to=i,this._filterExistingFeatures(n,o,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,l)}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 n=t&&i?this._getFeaturesInTimeRange(t,i):this._currentSnapshot,o=this._getFeaturesInTimeRange(s,r);if(o.indexOf)for(var a=0;a=0&&n.splice(u,1)}e.Util.requestAnimFrame(e.Util.bind(function(){this.removeLayers(n),this.addLayers(o)},this))},_getFeaturesInTimeRange:function(t,e){var i,s=[];if(this.options.timeField.start&&this.options.timeField.end){var r=this._startTimeIndex.between(t,e),n=this._endTimeIndex.between(t,e);i=r.concat(n)}else i=this._timeIndex.between(t,e);for(var o=i.length-1;o>=0;o--)s.push(i[o].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 n=[];for(e=t.length-1;e>=0;e--)i=t[e],n.push({id:i.id,value:new Date(i.properties[this.options.timeField])});this._timeIndex.bulkAdd(n)}},_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&&s<=i}if(this.options.timeField.start&&this.options.timeField.end){var r=+t.properties[this.options.timeField.start],n=+t.properties[this.options.timeField.end];return r>=e&&r<=i||n>=e&&n<=i}},_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),this.fire("addfeature",{feature:r.feature},!0)),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._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._visibleZoom()&&!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 n=!0,o=0;o (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\",\n \"leaflet-virtual-grid\": \"^1.0.3\",\n \"tiny-binary-search\": \"^1.0.2\"\n },\n \"devDependencies\": {\n \"chai\": \"3.5.0\",\n \"gh-release\": \"^2.0.0\",\n \"highlight.js\": \"^8.0.0\",\n \"http-server\": \"^0.8.5\",\n \"husky\": \"^0.12.0\",\n \"isparta\": \"^4.0.0\",\n \"istanbul\": \"^0.4.2\",\n \"karma\": \"^1.7.0\",\n \"karma-chai-sinon\": \"^0.1.3\",\n \"karma-coverage\": \"^1.1.1\",\n \"karma-mocha\": \"^1.3.0\",\n \"karma-mocha-reporter\": \"^2.2.1\",\n \"karma-phantomjs-launcher\": \"^0.2.0\",\n \"karma-sourcemap-loader\": \"^0.3.5\",\n \"mkdirp\": \"^0.5.1\",\n \"mocha\": \"^3.4.2\",\n \"parallelshell\": \"^2.0.0\",\n \"phantomjs\": \"^1.9.8\",\n \"rollup\": \"^0.25.4\",\n \"rollup-plugin-json\": \"^2.3.0\",\n \"rollup-plugin-node-resolve\": \"^1.4.0\",\n \"rollup-plugin-uglify\": \"^0.3.1\",\n \"semistandard\": \"^9.0.0\",\n \"sinon\": \"^1.11.1\",\n \"sinon-chai\": \"2.8.0\",\n \"snazzy\": \"^5.0.0\",\n \"uglify-js\": \"^2.8.29\",\n \"watch\": \"^0.17.1\"\n },\n \"homepage\": \"http://esri.github.io/esri-leaflet\",\n \"module\": \"src/EsriLeaflet.js\",\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 | snazzy\",\n \"prebuild\": \"mkdirp dist\",\n \"prepublish\": \"npm run build\",\n \"pretest\": \"npm run build\",\n \"precommit\": \"npm run lint\",\n \"release\": \"./scripts/release.sh\",\n \"start-watch\": \"watch \\\"npm run build\\\" src\",\n \"start\": \"parallelshell \\\"npm run start-watch\\\" \\\"http-server -p 5000 -c-1 -o\\\"\",\n \"test\": \"npm run lint && karma start\"\n },\n \"semistandard\": {\n \"globals\": [\n \"expect\",\n \"L\",\n \"XMLHttpRequest\",\n \"sinon\",\n \"xhr\",\n \"proj4\"\n ]\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","export var options = {\n attributionWidthOffset: 55\n};\n\nexport default options;\n","import { Util, DomUtil } 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 = 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 = 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 httpRequest.open('POST', url);\n\n if (typeof context !== 'undefined' && context !== null) {\n if (typeof context.options !== 'undefined') {\n httpRequest.timeout = context.options.timeout;\n }\n }\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 httpRequest.open('GET', url + '?' + serialize(params), true);\n\n if (typeof context !== 'undefined' && context !== null) {\n if (typeof context.options !== 'undefined') {\n httpRequest.timeout = context.options.timeout;\n }\n }\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 var requestLength = (url + '?' + paramString).length;\n\n // ie10/11 require the request be opened before a timeout is applied\n if (requestLength <= 2000 && Support.cors) {\n httpRequest.open('GET', url + '?' + paramString);\n } else if (requestLength > 2000 && Support.cors) {\n httpRequest.open('POST', url);\n httpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n }\n\n if (typeof context !== 'undefined' && context !== null) {\n if (typeof context.options !== 'undefined') {\n httpRequest.timeout = context.options.timeout;\n }\n }\n\n // request is less than 2000 characters and the browser supports CORS, make GET request with XMLHttpRequest\n if (requestLength <= 2000 && Support.cors) {\n httpRequest.send(null);\n\n // request is more than 2000 characters and the browser supports CORS, make POST request with XMLHttpRequest\n } else if (requestLength > 2000 && Support.cors) {\n httpRequest.send(paramString);\n\n // request is less than 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 params.callback = 'window._EsriLeafletCallbacks.' + 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 var script = DomUtil.create('script', null, document.body);\n script.type = 'text/javascript';\n script.src = url + '?' + serialize(params);\n script.id = callbackId;\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","/*\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 { latLng, latLngBounds, LatLng, LatLngBounds, Util, DomUtil, GeoJSON } from 'leaflet';\nimport { jsonp } from './Request';\nimport { options } from './Options';\n\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 // \"NaN\" coordinates from ArcGIS Server indicate a null geometry\n if (extent.xmin !== 'NaN' && extent.ymin !== 'NaN' && extent.xmax !== 'NaN' && extent.ymax !== 'NaN') {\n var sw = latLng(extent.ymin, extent.xmin);\n var ne = latLng(extent.ymax, extent.xmax);\n return latLngBounds(sw, ne);\n } else {\n return null;\n }\n}\n\n// convert an LatLngBounds (Leaflet) to extent (ArcGIS)\nexport function boundsToExtent (bounds) {\n bounds = 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 var features = response.features || response.results;\n var count = features.length;\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 if (count) {\n /* as a last resort, check for common ID fieldnames in the first feature returned\n not foolproof. identifyFeatures can returned a mixed array of features. */\n for (var key in features[0].attributes) {\n if (key.match(/^(OBJECTID|FID|OID|ID)$/i)) {\n objectIdField = key;\n break;\n }\n }\n }\n\n var featureCollection = {\n type: 'FeatureCollection',\n features: []\n };\n\n if (count) {\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 = 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 support geojson as an output format\n utility.arcgis.com services are proxied from a variety of ArcGIS Server vintages, and may not */\n return (/^(?!.*utility\\.arcgis\\.com).*\\.arcgis\\.com.*FeatureServer/i).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 function calcAttributionWidth (map) {\n // either crop at 55px or user defined buffer\n return (map.getSize().x - options.attributionWidthOffset) + 'px';\n}\n\nexport function setEsriAttribution (map) {\n if (map.attributionControl && !map.attributionControl._esriAttributionAdded) {\n map.attributionControl.setPrefix('Leaflet | Powered by Esri');\n\n var hoverAttributionStyle = document.createElement('style');\n hoverAttributionStyle.type = 'text/css';\n hoverAttributionStyle.innerHTML = '.esri-truncated-attribution:hover {' +\n 'white-space: normal;' +\n '}';\n\n document.getElementsByTagName('head')[0].appendChild(hoverAttributionStyle);\n DomUtil.addClass(map.attributionControl._container, 'esri-truncated-attribution:hover');\n\n // define a new css class in JS to trim attribution into a single line\n var attributionStyle = document.createElement('style');\n attributionStyle.type = 'text/css';\n attributionStyle.innerHTML = '.esri-truncated-attribution {' +\n 'vertical-align: -3px;' +\n 'white-space: nowrap;' +\n 'overflow: hidden;' +\n 'text-overflow: ellipsis;' +\n 'display: inline-block;' +\n 'transition: 0s white-space;' +\n 'transition-delay: 1s;' +\n 'max-width: ' + calcAttributionWidth(map) + ';' +\n '}';\n\n document.getElementsByTagName('head')[0].appendChild(attributionStyle);\n DomUtil.addClass(map.attributionControl._container, 'esri-truncated-attribution');\n\n // update the width used to truncate when the map itself is resized\n map.on('resize', function (e) {\n map.attributionControl._container.style.maxWidth = calcAttributionWidth(e.target);\n });\n\n map.attributionControl._esriAttributionAdded = true;\n }\n}\n\nexport function _setGeometry (geometry) {\n var params = {\n geometry: null,\n geometryType: null\n };\n\n // convert bounds to extent and finish\n if (geometry instanceof LatLngBounds) {\n // set geometry + geometryType\n params.geometry = boundsToExtent(geometry);\n params.geometryType = 'esriGeometryEnvelope';\n return params;\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 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 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 params.geometry = geojsonToArcGIS(geometry);\n params.geometryType = 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' || geometry.type === 'MultiPolygon') {\n params.geometry = geojsonToArcGIS(geometry);\n params.geometryType = geojsonTypeToArcGIS(geometry.type);\n return params;\n }\n\n // warn the user if we havn't found an appropriate object\n warn('invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object');\n\n return;\n}\n\nexport function _getAttributionData (url, map) {\n jsonp(url, {}, Util.bind(function (error, attributions) {\n if (error) { return; }\n map._esriAttributions = [];\n for (var c = 0; c < attributions.contributors.length; c++) {\n var contributor = attributions.contributors[c];\n\n for (var i = 0; i < contributor.coverageAreas.length; i++) {\n var coverageArea = contributor.coverageAreas[i];\n var southWest = latLng(coverageArea.bbox[0], coverageArea.bbox[1]);\n var northEast = latLng(coverageArea.bbox[2], coverageArea.bbox[3]);\n map._esriAttributions.push({\n attribution: contributor.attribution,\n score: coverageArea.score,\n bounds: latLngBounds(southWest, northEast),\n minZoom: coverageArea.zoomMin,\n maxZoom: coverageArea.zoomMax\n });\n }\n }\n\n map._esriAttributions.sort(function (a, b) {\n return b.score - a.score;\n });\n\n // pass the same argument as the map's 'moveend' event\n var obj = { target: map };\n _updateMapAttribution(obj);\n }, this));\n}\n\nexport function _updateMapAttribution (evt) {\n var map = evt.target;\n var oldAttributions = map._esriAttributions;\n\n if (map && map.attributionControl && oldAttributions) {\n var newAttributions = '';\n var bounds = map.getBounds();\n var wrappedBounds = latLngBounds(\n bounds.getSouthWest().wrap(),\n bounds.getNorthEast().wrap()\n );\n var zoom = map.getZoom();\n\n for (var i = 0; i < oldAttributions.length; i++) {\n var attribution = oldAttributions[i];\n var text = attribution.attribution;\n\n if (!newAttributions.match(text) && attribution.bounds.intersects(wrappedBounds) && zoom >= attribution.minZoom && zoom <= attribution.maxZoom) {\n newAttributions += (', ' + text);\n }\n }\n\n newAttributions = newAttributions.substr(2);\n var attributionElement = map.attributionControl._container.querySelector('.esri-dynamic-attribution');\n\n attributionElement.innerHTML = newAttributions;\n attributionElement.style.maxWidth = calcAttributionWidth(map);\n\n map.fire('attributionupdated', {\n attribution: newAttributions\n });\n }\n}\n\nexport var EsriUtil = {\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 calcAttributionWidth: calcAttributionWidth,\n setEsriAttribution: setEsriAttribution,\n _setGeometry: _setGeometry,\n _getAttributionData: _getAttributionData,\n _updateMapAttribution: _updateMapAttribution\n};\n\nexport default EsriUtil;\n","import { Class, Util } from 'leaflet';\nimport {cors} from '../Support';\nimport {cleanUrl} from '../Util';\nimport Request from '../Request';\n\nexport var Task = 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 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 Util.setOptions(this, endpoint.options);\n } else {\n Util.setOptions(this, endpoint);\n this.options.url = cleanUrl(endpoint.url);\n }\n\n // clone default params into this object\n this.params = 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 // ArcGIS Server Find/Identify 10.5+\n format: function (boolean) {\n // use double negative to expose a more intuitive positive method name\n this.params.returnUnformattedValues = !boolean;\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 { point, latLng } from 'leaflet';\nimport { Task } from './Task';\nimport {\n warn,\n responseToFeatureCollection,\n isArcgisOnline,\n extentToBounds,\n _setGeometry\n} from '../Util';\n\nexport var Query = Task.extend({\n setters: {\n 'offset': 'resultOffset',\n 'limit': 'resultRecordCount',\n 'fields': 'outFields',\n 'precision': 'geometryPrecision',\n 'featureIds': 'objectIds',\n 'returnGeometry': 'returnGeometry',\n 'transform': 'datumTransformation',\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 // Returns a feature if its shape is wholly contained within the search geometry. Valid for all shape type combinations.\n within: function (geometry) {\n this._setGeometryParams(geometry);\n this.params.spatialRel = 'esriSpatialRelContains'; // to the REST api this reads geometry **contains** layer\n return this;\n },\n\n // Returns a feature if any spatial relationship is found. Applies to all shape type combinations.\n intersects: function (geometry) {\n this._setGeometryParams(geometry);\n this.params.spatialRel = 'esriSpatialRelIntersects';\n return this;\n },\n\n // Returns a feature if its shape wholly contains the search geometry. Valid for all shape type combinations.\n contains: function (geometry) {\n this._setGeometryParams(geometry);\n this.params.spatialRel = 'esriSpatialRelWithin'; // to the REST api this reads geometry **within** layer\n return this;\n },\n\n // Returns a feature if the intersection of the interiors of the two shapes is not empty and has a lower dimension than the maximum dimension of the two shapes. Two lines that share an endpoint in common do not cross. Valid for Line/Line, Line/Area, Multi-point/Area, and Multi-point/Line shape type combinations.\n crosses: function (geometry) {\n this._setGeometryParams(geometry);\n this.params.spatialRel = 'esriSpatialRelCrosses';\n return this;\n },\n\n // Returns a feature if the two shapes share a common boundary. However, the intersection of the interiors of the two shapes must be empty. In the Point/Line case, the point may touch an endpoint only of the line. Applies to all combinations except Point/Point.\n touches: function (geometry) {\n this._setGeometryParams(geometry);\n this.params.spatialRel = 'esriSpatialRelTouches';\n return this;\n },\n\n // Returns a feature if the intersection of the two shapes results in an object of the same dimension, but different from both of the shapes. Applies to Area/Area, Line/Line, and Multi-point/Multi-point shape type combinations.\n overlaps: function (geometry) {\n this._setGeometryParams(geometry);\n this.params.spatialRel = 'esriSpatialRelOverlaps';\n return this;\n },\n\n // Returns a feature if the envelope of the two shapes intersects.\n bboxIntersects: function (geometry) {\n this._setGeometryParams(geometry);\n this.params.spatialRel = 'esriSpatialRelEnvelopeIntersects';\n return this;\n },\n\n // if someone can help decipher the ArcObjects explanation and translate to plain speak, we should mention this method in the doc\n indexIntersects: function (geometry) {\n this._setGeometryParams(geometry);\n this.params.spatialRel = 'esriSpatialRelIndexIntersects'; // Returns a feature if the envelope of the query geometry intersects the index entry for the target geometry\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 = 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 // services hosted on ArcGIS Online and ArcGIS Server 10.3.1+ support requesting geojson directly\n if (this.options.isModern || 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 && 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 if (response && response.extent && extentToBounds(response.extent)) {\n callback.call(context, error, extentToBounds(response.extent), response);\n } else {\n error = {\n message: 'Invalid Bounds'\n };\n callback.call(context, error, null, response);\n }\n }, context);\n },\n\n // only valid for image services\n pixelSize: function (rawPoint) {\n var castPoint = point(rawPoint);\n this.params.pixelSize = [castPoint.x, castPoint.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 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 _setGeometryParams: function (geometry) {\n this.params.inSr = 4326;\n var converted = _setGeometry(geometry);\n this.params.geometry = converted.geometry;\n this.params.geometryType = converted.geometryType;\n }\n\n});\n\nexport function query (options) {\n return new Query(options);\n}\n\nexport default query;\n","import { Task } from './Task';\nimport { responseToFeatureCollection } 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 // skipped implementing this (for now) because the REST service implementation isnt consistent between operations\n // 'transform': 'datumTransformations',\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 && 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 { latLng } from 'leaflet';\nimport { Identify } from './Identify';\nimport { responseToFeatureCollection,\n boundsToExtent,\n _setGeometry\n} from '../Util';\n\nexport var IdentifyFeatures = Identify.extend({\n setters: {\n 'layers': 'layers',\n 'precision': 'geometryPrecision',\n 'tolerance': 'tolerance',\n // skipped implementing this (for now) because the REST service implementation isnt consistent between operations.\n // 'transform': 'datumTransformations'\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 = 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 (geometry) {\n // cast lat, long pairs in raw array form manually\n if (geometry.length === 2) {\n geometry = latLng(geometry);\n }\n this._setGeometryParams(geometry);\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) * 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 = 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 _setGeometryParams: function (geometry) {\n var converted = _setGeometry(geometry);\n this.params.geometry = converted.geometry;\n this.params.geometryType = converted.geometryType;\n }\n});\n\nexport function identifyFeatures (options) {\n return new IdentifyFeatures(options);\n}\n\nexport default identifyFeatures;\n","import { latLng } from 'leaflet';\nimport { Identify } from './Identify';\nimport { responseToFeatureCollection } 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 = 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 = 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 { Util, Evented } from 'leaflet';\nimport {cors} from '../Support';\nimport {cleanUrl} from '../Util';\nimport Request from '../Request';\n\nexport var Service = 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 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 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: 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 = 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 { TileLayer, Util } from 'leaflet';\nimport { pointerEvents } from '../Support';\nimport {\n setEsriAttribution,\n _getAttributionData,\n _updateMapAttribution\n} from '../Util';\n\nvar tileProtocol = (window.location.protocol !== 'https:') ? 'http:' : 'https:';\n\nexport var BasemapLayer = 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 options: {\n minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n attribution: 'USGS, NOAA',\n attributionUrl: 'https://static.arcgis.com/attribution/World_Street_Map'\n }\n },\n Topographic: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}',\n options: {\n minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n attribution: 'USGS, NOAA',\n attributionUrl: 'https://static.arcgis.com/attribution/World_Topo_Map'\n }\n },\n Oceans: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}',\n options: {\n minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n attribution: 'USGS, NOAA',\n attributionUrl: 'https://static.arcgis.com/attribution/Ocean_Basemap'\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 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 minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n attribution: 'National Geographic, 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 minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n attribution: '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 minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\n attribution: ''\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 minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n attribution: '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 minZoom: 1,\n maxZoom: 16,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\n attribution: ''\n }\n },\n Imagery: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',\n options: {\n minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n attribution: '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 minZoom: 1,\n maxZoom: 19,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\n attribution: ''\n }\n },\n ImageryTransportation: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}',\n options: {\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 minZoom: 1,\n maxZoom: 13,\n subdomains: ['server', 'services'],\n attribution: '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 minZoom: 1,\n maxZoom: 12,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\n attribution: ''\n }\n },\n Terrain: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{z}/{y}/{x}',\n options: {\n minZoom: 1,\n maxZoom: 13,\n subdomains: ['server', 'services'],\n attribution: '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 minZoom: 1,\n maxZoom: 13,\n subdomains: ['server', 'services'],\n pane: (pointerEvents) ? 'esri-labels' : 'tilePane',\n attribution: ''\n }\n },\n USATopo: {\n urlTemplate: tileProtocol + '//{s}.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}',\n options: {\n minZoom: 1,\n maxZoom: 15,\n subdomains: ['server', 'services'],\n attribution: 'USGS, National Geographic Society, i-cubed'\n }\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\", \"TerrainLabels\" or \"USATopo\"');\n }\n\n // merge passed options into the config options\n var tileOptions = Util.extend(config.options, options);\n\n Util.setOptions(this, tileOptions);\n\n if (this.options.token) {\n config.urlTemplate += ('?token=' + this.options.token);\n }\n\n // call the initialize method on L.TileLayer to set everything up\n TileLayer.prototype.initialize.call(this, config.urlTemplate, tileOptions);\n },\n\n onAdd: function (map) {\n // include 'Powered by Esri' in map attribution\n setEsriAttribution(map);\n\n if (this.options.pane === 'esri-labels') {\n this._initPane();\n }\n // some basemaps can supply dynamic attribution\n if (this.options.attributionUrl) {\n _getAttributionData(this.options.attributionUrl, map);\n }\n\n map.on('moveend', _updateMapAttribution);\n\n TileLayer.prototype.onAdd.call(this, map);\n },\n\n onRemove: function (map) {\n map.off('moveend', _updateMapAttribution);\n TileLayer.prototype.onRemove.call(this, map);\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 getAttribution: function () {\n if (this.options.attribution) {\n var attribution = '' + this.options.attribution + '';\n }\n return attribution;\n }\n});\n\nexport function basemapLayer (key, options) {\n return new BasemapLayer(key, options);\n}\n\nexport default basemapLayer;\n","import { TileLayer, Util } from 'leaflet';\nimport { warn, cleanUrl, setEsriAttribution } from '../Util';\nimport mapService from '../Services/MapService';\n\nexport var TiledMapLayer = TileLayer.extend({\n options: {\n zoomOffsetAllowance: 0.1,\n errorTileUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEABAMAAACuXLVVAAAAA1BMVEUzNDVszlHHAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAADZJREFUeJztwQEBAAAAgiD/r25IQAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7waBAAABw08RwAAAAABJRU5ErkJggg=='\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 = 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 TileLayer.prototype.initialize.call(this, this.tileUrl, options);\n },\n\n getTileUrl: function (tilePoint) {\n var zoom = this._getZoomForUrl();\n\n return Util.template(this.tileUrl, Util.extend({\n s: this._getSubdomain(tilePoint),\n x: tilePoint.x,\n y: tilePoint.y,\n // try lod map first, then just default to zoom level\n z: (this._lodMap && this._lodMap[zoom]) ? this._lodMap[zoom] : zoom\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[this._getZoomForUrl()])) {\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 // include 'Powered by Esri' in map attribution\n setEsriAttribution(map);\n\n if (!this._lodMap) {\n this.metadata(function (error, metadata) {\n if (!error && metadata.spatialReference) {\n var sr = metadata.spatialReference.latestWkid || metadata.spatialReference.wkid;\n if (!this.options.attribution && map.attributionControl && metadata.copyrightText) {\n this.options.attribution = metadata.copyrightText;\n map.attributionControl.addAttribution(this.getAttribution());\n }\n if (map.options.crs === L.CRS.EPSG3857 && sr === 102100 || sr === 3857) {\n this._lodMap = {};\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 if (!proj4) {\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 }\n }, this);\n }\n\n 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 { ImageOverlay, CRS, DomUtil, Util, Layer, popup, latLng, bounds } from 'leaflet';\nimport { cors } from '../Support';\nimport { setEsriAttribution } from '../Util';\n\nvar Overlay = ImageOverlay.extend({\n onAdd: function (map) {\n this._topLeft = map.getPixelBounds().min;\n ImageOverlay.prototype.onAdd.call(this, map);\n },\n _reset: function () {\n if (this._map.options.crs === CRS.EPSG3857) {\n ImageOverlay.prototype._reset.call(this);\n } else {\n DomUtil.setPosition(this._image, this._topLeft.subtract(this._map.getPixelOrigin()));\n }\n }\n});\n\nexport var RasterLayer = Layer.extend({\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 // include 'Powered by Esri' in map attribution\n setEsriAttribution(map);\n\n this._update = 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 // add copyright text listed in service metadata\n this.metadata(function (err, metadata) {\n if (!err && !this.options.attribution && map.attributionControl && metadata.copyrightText) {\n this.options.attribution = metadata.copyrightText;\n map.attributionControl.addAttribution(this.getAttribution());\n }\n }, this);\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 = 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 if (this._currentImage) {\n this._currentImage.setOpacity(opacity);\n }\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 redraw: function () {\n this._update();\n },\n\n _renderImage: function (url, bounds, contentType) {\n if (this._map) {\n // if no output directory has been specified for a service, MIME data will be returned\n if (contentType) {\n url = 'data:' + contentType + ';base64,' + url;\n }\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 var onOverlayError = function () {\n this._map.removeLayer(image);\n this.fire('error');\n image.off('load', onOverlayLoad, this);\n };\n\n var onOverlayLoad = function (e) {\n image.off('error', onOverlayLoad, this);\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 };\n\n // If loading the image fails\n image.once('error', onOverlayError, this);\n\n // once the image loads\n image.once('load', onOverlayLoad, 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 if (this._currentImage) {\n this._currentImage._map.removeLayer(this._currentImage);\n this._currentImage = null;\n }\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 = 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 _calculateBbox: function () {\n var pixelBounds = this._map.getPixelBounds();\n\n var sw = this._map.unproject(pixelBounds.getBottomLeft());\n var ne = this._map.unproject(pixelBounds.getTopRight());\n\n var neProjected = this._map.options.crs.project(ne);\n var swProjected = this._map.options.crs.project(sw);\n\n // this ensures ne/sw are switched in polar maps where north/top bottom/south is inverted\n var boundsProjected = bounds(neProjected, swProjected);\n\n return [boundsProjected.getBottomLeft().x, boundsProjected.getBottomLeft().y, boundsProjected.getTopRight().x, boundsProjected.getTopRight().y].join(',');\n },\n\n _calculateImageSize: function () {\n // ensure that we don't ask ArcGIS Server for a taller image than we have actual map displaying within the div\n var bounds = this._map.getPixelBounds();\n var size = this._map.getSize();\n\n var sw = this._map.unproject(bounds.getBottomLeft());\n var ne = this._map.unproject(bounds.getTopRight());\n\n var top = this._map.latLngToLayerPoint(ne).y;\n var bottom = this._map.latLngToLayerPoint(sw).y;\n\n if (top > 0 || bottom < size.y) {\n size.y = bottom - top;\n }\n\n return size.x + ',' + size.y;\n }\n});\n","import { Util } 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 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 (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 (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 = 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(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 sr = parseInt(this._map.options.crs.code.split(':')[1], 10);\n\n var params = {\n bbox: this._calculateBbox(),\n size: this._calculateImageSize(),\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 // 0 is falsy *and* a valid input parameter\n if (this.options.noData === 0 || 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 if (this.options.token) {\n response.href += ('?token=' + this.options.token);\n }\n this._renderImage(response.href, bounds);\n }, this);\n } else {\n params.f = 'image';\n this._renderImage(this.options.url + 'exportImage' + 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 { Util } 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\n 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 = 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(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 // remove extraneous vertices from response features\n identifyRequest.simplify(this._map, 0.5);\n\n if (this.options.layers) {\n identifyRequest.layers('visible:' + this.options.layers.join(','));\n } else {\n identifyRequest.layers('visible');\n }\n\n // if present, pass layer ids and sql filters through to the identify task\n if (this.options.layerDefs && typeof this.options.layerDefs !== 'string') {\n for (var id in this.options.layerDefs) {\n if (this.options.layerDefs.hasOwnProperty(id)) {\n identifyRequest.layerDef(id, this.options.layerDefs[id]);\n }\n }\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 sr = parseInt(this._map.options.crs.code.split(':')[1], 10);\n\n var params = {\n bbox: this._calculateBbox(),\n size: this._calculateImageSize(),\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 = typeof this.options.layerDefs === 'string' ? this.options.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 if (this.options.proxy) {\n params.proxy = this.options.proxy;\n }\n\n // use a timestamp to bust server cache\n if (this.options.disableCache) {\n params._ts = Date.now();\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\n if (this.options.token) {\n response.href += ('?token=' + this.options.token);\n }\n if (this.options.proxy) {\n response.href = this.options.proxy + '?' + response.href;\n }\n if (response.href) {\n this._renderImage(response.href, bounds);\n } else {\n this._renderImage(response.imageData, bounds, response.contentType);\n }\n }, this);\n } else {\n params.f = 'image';\n this._renderImage(this.options.url + 'export' + 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._zooming = false;\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 zoomstart: this._zoomstart,\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 _zoomstart: function () {\n this._zooming = true;\n },\n\n _reset: function () {\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._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\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 { Util } from 'leaflet';\nimport featureLayerService from '../../Services/FeatureLayerService';\nimport { cleanUrl, warn, setEsriAttribution } 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 = Util.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 // include 'Powered by Esri' in map attribution\n setEsriAttribution(map);\n\n this.service.metadata(function (err, metadata) {\n if (!err) {\n var supportedFormats = metadata.supportedQueryFormats;\n\n // Check if someone has requested that we don't use geoJSON, even if it's available\n var forceJsonFormat = false;\n if (this.service.options.isModern === false) {\n forceJsonFormat = true;\n }\n\n // Unless we've been told otherwise, check to see whether service can emit GeoJSON natively\n if (!forceJsonFormat && supportedFormats && supportedFormats.indexOf('geoJSON') !== -1) {\n this.service.options.isModern = true;\n }\n\n // add copyright text listed in service metadata\n if (!this.options.attribution && map.attributionControl && metadata.copyrightText) {\n this.options.attribution = metadata.copyrightText;\n map.attributionControl.addAttribution(this.getAttribution());\n }\n }\n }, this);\n\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 // dont fetch features outside the scale range defined for the layer\n if (this._visibleZoom()) {\n this._requestFeatures(bounds, coords);\n }\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 Util.requestAnimFrame(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 // deincrement 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\n if (this._currentSnapshot.indexOf(id) === -1) {\n this._currentSnapshot.push(id);\n }\n if (this._cache[key].indexOf(id) === -1) {\n this._cache[key].push(id);\n }\n }\n\n if (this.options.timeField) {\n this._buildTimeIndexes(features);\n }\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 = 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 && this._visibleZoom()) {\n this._currentSnapshot = newSnapshot;\n // schedule adding features for the next animation frame\n Util.requestAnimFrame(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 = 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 Util.requestAnimFrame(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(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(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, 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 { Util, GeoJSON, latLng } 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 // trigger the event when the entire featureLayer is removed from the map\n this.fire('removefeature', {\n feature: this._layers[i].feature,\n permanent: false\n }, true);\n }\n\n return FeatureManager.prototype.onRemove.call(this, map);\n },\n\n createNewLayer: function (geojson) {\n var layer = 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 || 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 = GeoJSON.coordsToLatLng(geojson.geometry.coordinates);\n layer.setLatLng(latlngs);\n break;\n case 'LineString':\n latlngs = GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 0, coordsToLatLng);\n layer.setLatLngs(latlngs);\n break;\n case 'MultiLineString':\n latlngs = GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng);\n layer.setLatLngs(latlngs);\n break;\n case 'Polygon':\n latlngs = GeoJSON.coordsToLatLngs(geojson.geometry.coordinates, 1, coordsToLatLng);\n layer.setLatLngs(latlngs);\n break;\n case 'MultiPolygon':\n latlngs = 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 this.fire('addfeature', {\n feature: layer.feature\n }, true);\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._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._visibleZoom() && !this._zooming && this._map) {\n Util.requestAnimFrame(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 Util.requestAnimFrame(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 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 eachActiveFeature: function (fn, context) {\n // figure out (roughly) which layers are in view\n if (this._map) {\n var activeBounds = this._map.getBounds();\n for (var i in this._layers) {\n if (this._currentSnapshot.indexOf(this._layers[i].feature.id) !== -1) {\n // a simple point in poly test for point geometries\n if (typeof this._layers[i].getLatLng === 'function' && activeBounds.contains(this._layers[i].getLatLng())) {\n fn.call(context, this._layers[i]);\n } else if (typeof this._layers[i].getBounds === 'function' && activeBounds.intersects(this._layers[i].getBounds())) {\n // intersecting bounds check for polyline and polygon geometries\n fn.call(context, this._layers[i]);\n }\n }\n }\n }\n return this;\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, 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, 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":["serialize","params","data","f","key","hasOwnProperty","value","param","type","Object","prototype","toString","call","length","JSON","stringify","join","valueOf","encodeURIComponent","createRequest","callback","context","httpRequest","window","XMLHttpRequest","onerror","e","onreadystatechange","Util","falseFn","error","code","message","response","readyState","parse","responseText","ontimeout","this","xmlHttpPost","url","open","options","timeout","setRequestHeader","send","xmlHttpGet","request","paramString","requestLength","Support","cors","jsonp","warn","_EsriLeafletCallbacks","callbackId","callbacks","responseType","script","DomUtil","create","document","body","src","id","abort","_callback","pointsEqual","a","b","i","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","orientRings","poly","output","shift","flattenMultiPolygonRings","shallowClone","obj","target","arcgisToGeoJSON","arcgis","idAttribute","geojson","y","points","paths","geometry","attributes","properties","OBJECTID","FID","geojsonToArcGIS","spatialReference","wkid","result","features","geometries","idAttr","g2a","a2g","extentToBounds","extent","xmin","ymin","xmax","ymax","sw","latLng","ne","latLngBounds","boundsToExtent","bounds","getSouthWest","lng","lat","getNorthEast","responseToFeatureCollection","objectIdField","results","count","objectIdFieldName","fields","name","match","featureCollection","feature","cleanUrl","trim","isArcgisOnline","test","geojsonTypeToArcGIS","geoJsonType","arcgisGeometryType","console","apply","arguments","calcAttributionWidth","map","getSize","attributionWidthOffset","setEsriAttribution","attributionControl","_esriAttributionAdded","setPrefix","hoverAttributionStyle","createElement","innerHTML","getElementsByTagName","appendChild","addClass","_container","attributionStyle","on","style","maxWidth","_setGeometry","geometryType","LatLngBounds","getLatLng","LatLng","GeoJSON","getLayers","toGeoJSON","_getAttributionData","bind","attributions","_esriAttributions","c","contributors","contributor","coverageAreas","coverageArea","southWest","bbox","northEast","attribution","score","minZoom","zoomMin","maxZoom","zoomMax","sort","_updateMapAttribution","evt","oldAttributions","newAttributions","getBounds","wrappedBounds","wrap","zoom","getZoom","text","substr","attributionElement","querySelector","fire","task","Task","query","Query","find","Find","identify","Identify","identifyFeatures","IdentifyFeatures","identifyImage","IdentifyImage","service","Service","mapService","MapService","imageService","ImageService","featureLayerService","FeatureLayerService","basemapLayer","BasemapLayer","tiledMapLayer","TiledMapLayer","imageMapLayer","ImageMapLayer","dynamicMapLayer","DynamicMapLayer","BinarySearchIndex","values","concat","featureLayer","FeatureLayer","pointerEvents","documentElement","get","CORS","JSONP","Request","post","EsriUtil","Class","extend","proxy","useCors","generateSetter","initialize","endpoint","_service","setOptions","setters","setter","token","authenticate","format","boolean","returnUnformattedValues","path","_request","method","offset","limit","precision","featureIds","returnGeometry","transform","where","outSr","outFields","within","_setGeometryParams","spatialRel","crosses","touches","overlaps","bboxIntersects","indexIntersects","nearby","latlng","radius","units","distance","inSr","string","between","start","end","time","simplify","factor","mapWidth","Math","abs","getWest","getEast","maxAllowableOffset","orderBy","fieldName","order","orderByFields","run","_cleanParams","isModern","_trapSQLerrors","returnCountOnly","ids","returnIdsOnly","objectIds","returnExtentOnly","pixelSize","rawPoint","castPoint","layer","converted","sr","layers","dynamicLayers","returnZ","returnM","gdbVersion","layerDefs","tolerance","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","wrappedCallback","_createServiceCallback","addFeature","addResults","updateFeature","updateResults","deleteFeature","deleteResults","deleteFeatures","tileProtocol","protocol","TileLayer","statics","TILES","Streets","urlTemplate","subdomains","attributionUrl","Topographic","Oceans","OceansLabels","pane","NationalGeographic","DarkGray","DarkGrayLabels","Gray","GrayLabels","Imagery","ImageryLabels","ImageryTransportation","ShadedRelief","ShadedReliefLabels","Terrain","TerrainLabels","USATopo","config","Error","tileOptions","onAdd","_initPane","onRemove","off","_map","getPane","createPane","zIndex","getAttribution","zoomOffsetAllowance","errorTileUrl","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","RegExp","replace","getTileUrl","tilePoint","_getZoomForUrl","template","s","_getSubdomain","z","_lodMap","createTile","coords","done","tile","L","DomEvent","_tileOnLoad","_tileOnError","crossOrigin","alt","once","latestWkid","copyrightText","addAttribution","CRS","EPSG3857","arcgisLODs","tileInfo","lods","correctResolutions","arcgisLOD","ci","correctRes","_withinPercentage","resolution","level","proj4","tokenQs","percentage","Overlay","ImageOverlay","_topLeft","getPixelBounds","min","_reset","setPosition","_image","subtract","getPixelOrigin","RasterLayer","Layer","opacity","position","interactive","_update","throttle","updateInterval","_currentImage","_bounds","equals","addLayer","removeLayer","_popup","_getPopupData","_resetPopupState","err","bindPopup","fn","popupOptions","_shouldRenderPopup","_lastClick","popup","_popupFunction","unbindPopup","closePopup","bringToFront","bringToBack","getOpacity","setOpacity","getTimeRange","from","to","setTimeRange","redraw","_renderImage","contentType","image","addTo","onOverlayError","onOverlayLoad","newImage","oldImage","_animatingZoom","_panTransition","_inProgress","_buildExportParams","_requestExport","_renderPopup","content","setLatLng","setContent","openOn","_calculateBbox","pixelBounds","unproject","getBottomLeft","getTopRight","neProjected","project","swProjected","boundsProjected","_calculateImageSize","top","latLngToLayerPoint","bottom","transparent","setPixelType","pixelType","getPixelType","setBandIds","bandIds","isArray","getBandIds","setNoData","noData","noDataInterpretation","getNoData","getNoDataInterpretation","identifyRequest","parseInt","split","bboxSR","imageSR","interpolation","compressionQuality","href","getParamString","timeOptions","getDynamicLayers","setDynamicLayers","setLayers","getLayerDefs","setLayerDefs","getTimeOptions","setTimeOptions","dpi","disableCache","_ts","Date","now","imageData","VirtualGrid","cellSize","_zooming","removeEventListener","getEvents","_removeCells","moveend","zoomstart","_zoomstart","zoomend","removeFrom","_cells","_activeCells","_cellsToLoad","_cellsTotal","_cellNumBounds","_getCellNumBounds","_resetWrap","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","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","supportedFormats","supportedQueryFormats","forceJsonFormat","indexOf","_handleZoomChange","_visibleZoom","_requestFeatures","_buildQuery","exceededTransferLimit","requestAnimFrame","_addFeatures","_postProcessFeatures","_cacheKey","_buildTimeIndexes","createLayers","setWhere","oldSnapshot","newSnapshot","pendingRequests","requestError","requestCallback","removeLayers","addLayers","getWhere","oldFrom","oldTo","_filterExistingFeatures","refresh","eachFeature","_redraw","newFrom","newTo","layersToRemove","_getFeaturesInTimeRange","layersToAdd","shouldRemoveLayer","search","startTimes","endTimes","startTimeEntries","endTimeEntries","timeEntries","_featureWithinTimeRange","date","startDate","endDate","_getMetadata","_metadata","cacheLayers","_originalStyle","_layers","permanent","createNewLayer","geometryToLayer","defaultOptions","_updateLayer","latlngs","coordsToLatLng","coordsToLatLngs","setLatLngs","newLayer","hasLayer","onEachFeature","setFeatureStyle","cacheKey","cellKey","mapBounds","removable","resetStyle","resetFeatureStyle","setStyle","Path","eachActiveFeature","activeBounds","getFeature","setIcon","pointToLayer","getIcon","updatedIcon","icon","getStyle","updatedStyle"],"mappings":";;;mPGMA,SAASA,GAAWC,GAClB,GAAIC,GAAO,EAEXD,GAAOE,EAAIF,EAAOE,GAAK,MAEvB,KAAK,GAAIC,KAAOH,GACd,GAAIA,EAAOI,eAAeD,GAAM,CAC9B,GAEIE,GAFAC,EAAQN,EAAOG,GACfI,EAAOC,OAAOC,UAAUC,SAASC,KAAKL,EAGtCL,GAAKW,SACPX,GAAQ,KAIRI,EADW,mBAATE,EACoD,oBAA7CC,OAAOC,UAAUC,SAASC,KAAKL,EAAM,IAA6BO,KAAKC,UAAUR,GAASA,EAAMS,KAAK,KAC5F,oBAATR,EACDM,KAAKC,UAAUR,GACL,kBAATC,EACDD,EAAMU,UAENV,EAGVL,GAAQgB,mBAAmBd,GAAO,IAAMc,mBAAmBZ,GAI/D,MAAOJ,GAGT,QAASiB,GAAeC,EAAUC,GAChC,GAAIC,GAAc,GAAIC,QAAOC,cA2C7B,OAzCAF,GAAYG,QAAU,SAAUC,GAC9BJ,EAAYK,mBAAqBC,OAAKC,QAEtCT,EAASR,KAAKS,GACZS,OACEC,KAAM,IACNC,QAAS,yBAEV,OAGLV,EAAYK,mBAAqB,WAC/B,GAAIM,GACAH,CAEJ,IAA+B,IAA3BR,EAAYY,WAAkB,CAChC,IACED,EAAWnB,KAAKqB,MAAMb,EAAYc,cA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