diff --git a/dist/esri-leaflet-renderers-debug.js b/dist/esri-leaflet-renderers-debug.js
new file mode 100644
index 0000000..c4e2a2f
--- /dev/null
+++ b/dist/esri-leaflet-renderers-debug.js
@@ -0,0 +1,1180 @@
+/* esri-leaflet-renderers - v2.0.5 - Fri Jun 02 2017 09:54:10 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'), require('esri-leaflet')) :
+ typeof define === 'function' && define.amd ? define(['exports', 'leaflet', 'esri-leaflet'], factory) :
+ (factory((global.L = global.L || {}, global.L.esri = global.L.esri || {}, global.L.esri.Renderers = global.L.esri.Renderers || {}),global.L,global.L.esri));
+}(this, function (exports,L,Esri) { 'use strict';
+
+ L = 'default' in L ? L['default'] : L;
+ Esri = 'default' in Esri ? Esri['default'] : Esri;
+
+ var version = "2.0.5";
+
+ var Symbol = L.Class.extend({
+ initialize: function (symbolJson, options) {
+ this._symbolJson = symbolJson;
+ this.val = null;
+ this._styles = {};
+ this._isDefault = false;
+ this._layerTransparency = 1;
+ if (options && options.layerTransparency) {
+ this._layerTransparency = 1 - (options.layerTransparency / 100.0);
+ }
+ },
+
+ // the geojson values returned are in points
+ pixelValue: function (pointValue) {
+ return pointValue * 1.333;
+ },
+
+ // color is an array [r,g,b,a]
+ colorValue: function (color) {
+ return 'rgb(' + color[0] + ',' + color[1] + ',' + color[2] + ')';
+ },
+
+ alphaValue: function (color) {
+ var alpha = color[3] / 255.0;
+ return alpha * this._layerTransparency;
+ },
+
+ getSize: function (feature, sizeInfo) {
+ var attr = feature.properties;
+ var field = sizeInfo.field;
+ var size = 0;
+ var featureValue = null;
+
+ if (field) {
+ featureValue = attr[field];
+ var minSize = sizeInfo.minSize;
+ var maxSize = sizeInfo.maxSize;
+ var minDataValue = sizeInfo.minDataValue;
+ var maxDataValue = sizeInfo.maxDataValue;
+ var featureRatio;
+ var normField = sizeInfo.normalizationField;
+ var normValue = attr ? parseFloat(attr[normField]) : undefined;
+
+ if (featureValue === null || (normField && ((isNaN(normValue) || normValue === 0)))) {
+ return null;
+ }
+
+ if (!isNaN(normValue)) {
+ featureValue /= normValue;
+ }
+
+ if (minSize !== null && maxSize !== null && minDataValue !== null && maxDataValue !== null) {
+ if (featureValue <= minDataValue) {
+ size = minSize;
+ } else if (featureValue >= maxDataValue) {
+ size = maxSize;
+ } else {
+ featureRatio = (featureValue - minDataValue) / (maxDataValue - minDataValue);
+ size = minSize + (featureRatio * (maxSize - minSize));
+ }
+ }
+ size = isNaN(size) ? 0 : size;
+ }
+ return size;
+ },
+
+ getColor: function (feature, colorInfo) {
+ // required information to get color
+ if (!(feature.properties && colorInfo && colorInfo.field && colorInfo.stops)) {
+ return null;
+ }
+
+ var attr = feature.properties;
+ var featureValue = attr[colorInfo.field];
+ var lowerBoundColor, upperBoundColor, lowerBound, upperBound;
+ var normField = colorInfo.normalizationField;
+ var normValue = attr ? parseFloat(attr[normField]) : undefined;
+ if (featureValue === null || (normField && ((isNaN(normValue) || normValue === 0)))) {
+ return null;
+ }
+
+ if (!isNaN(normValue)) {
+ featureValue /= normValue;
+ }
+
+ if (featureValue <= colorInfo.stops[0].value) {
+ return colorInfo.stops[0].color;
+ }
+ var lastStop = colorInfo.stops[colorInfo.stops.length - 1];
+ if (featureValue >= lastStop.value) {
+ return lastStop.color;
+ }
+
+ // go through the stops to find min and max
+ for (var i = 0; i < colorInfo.stops.length; i++) {
+ var stopInfo = colorInfo.stops[i];
+
+ if (stopInfo.value <= featureValue) {
+ lowerBoundColor = stopInfo.color;
+ lowerBound = stopInfo.value;
+ } else if (stopInfo.value > featureValue) {
+ upperBoundColor = stopInfo.color;
+ upperBound = stopInfo.value;
+ break;
+ }
+ }
+
+ // feature falls between two stops, interplate the colors
+ if (!isNaN(lowerBound) && !isNaN(upperBound)) {
+ var range = upperBound - lowerBound;
+ if (range > 0) {
+ // more weight the further it is from the lower bound
+ var upperBoundColorWeight = (featureValue - lowerBound) / range;
+ if (upperBoundColorWeight) {
+ // more weight the further it is from the upper bound
+ var lowerBoundColorWeight = (upperBound - featureValue) / range;
+ if (lowerBoundColorWeight) {
+ // interpolate the lower and upper bound color by applying the
+ // weights to each of the rgba colors and adding them together
+ var interpolatedColor = [];
+ for (var j = 0; j < 4; j++) {
+ interpolatedColor[j] = (Math.round(lowerBoundColor[j] * lowerBoundColorWeight) + (upperBoundColor[j] * upperBoundColorWeight));
+ }
+ return interpolatedColor;
+ } else {
+ // no difference between featureValue and upperBound, 100% of upperBoundColor
+ return upperBoundColor;
+ }
+ } else {
+ // no difference between featureValue and lowerBound, 100% of lowerBoundColor
+ return lowerBoundColor;
+ }
+ }
+ }
+ // if we get to here, none of the cases apply so return null
+ return null;
+ }
+ });
+
+ var ShapeMarker = L.Path.extend({
+
+ initialize: function (latlng, size, options) {
+ L.setOptions(this, options);
+ this._size = size;
+ this._latlng = L.latLng(latlng);
+ this._svgCanvasIncludes();
+ },
+
+ toGeoJSON: function () {
+ return L.GeoJSON.getFeature(this, {
+ type: 'Point',
+ coordinates: L.GeoJSON.latLngToCoords(this.getLatLng())
+ });
+ },
+
+ _svgCanvasIncludes: function () {
+ // implement in sub class
+ },
+
+ _project: function () {
+ this._point = this._map.latLngToLayerPoint(this._latlng);
+ },
+
+ _update: function () {
+ if (this._map) {
+ this._updatePath();
+ }
+ },
+
+ _updatePath: function () {
+ // implement in sub class
+ },
+
+ setLatLng: function (latlng) {
+ this._latlng = L.latLng(latlng);
+ this.redraw();
+ return this.fire('move', {latlng: this._latlng});
+ },
+
+ getLatLng: function () {
+ return this._latlng;
+ },
+
+ setSize: function (size) {
+ this._size = size;
+ return this.redraw();
+ },
+
+ getSize: function () {
+ return this._size;
+ }
+ });
+
+ var CrossMarker = ShapeMarker.extend({
+
+ initialize: function (latlng, size, options) {
+ ShapeMarker.prototype.initialize.call(this, latlng, size, options);
+ },
+
+ _updatePath: function () {
+ this._renderer._updateCrossMarker(this);
+ },
+
+ _svgCanvasIncludes: function () {
+ L.Canvas.include({
+ _updateCrossMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+ var ctx = this._ctx;
+
+ ctx.beginPath();
+ ctx.moveTo(latlng.x, latlng.y + offset);
+ ctx.lineTo(latlng.x, latlng.y - offset);
+ this._fillStroke(ctx, layer);
+
+ ctx.moveTo(latlng.x - offset, latlng.y);
+ ctx.lineTo(latlng.x + offset, latlng.y);
+ this._fillStroke(ctx, layer);
+ }
+ });
+
+ L.SVG.include({
+ _updateCrossMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+
+ if (L.Browser.vml) {
+ latlng._round();
+ offset = Math.round(offset);
+ }
+
+ var str = 'M' + latlng.x + ',' + (latlng.y + offset) +
+ 'L' + latlng.x + ',' + (latlng.y - offset) +
+ 'M' + (latlng.x - offset) + ',' + latlng.y +
+ 'L' + (latlng.x + offset) + ',' + latlng.y;
+
+ this._setPath(layer, str);
+ }
+ });
+ }
+ });
+
+ var crossMarker = function (latlng, size, options) {
+ return new CrossMarker(latlng, size, options);
+ };
+
+ var XMarker = ShapeMarker.extend({
+
+ initialize: function (latlng, size, options) {
+ ShapeMarker.prototype.initialize.call(this, latlng, size, options);
+ },
+
+ _updatePath: function () {
+ this._renderer._updateXMarker(this);
+ },
+
+ _svgCanvasIncludes: function () {
+ L.Canvas.include({
+ _updateXMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+ var ctx = this._ctx;
+
+ ctx.beginPath();
+
+ ctx.moveTo(latlng.x + offset, latlng.y + offset);
+ ctx.lineTo(latlng.x - offset, latlng.y - offset);
+ this._fillStroke(ctx, layer);
+ }
+ });
+
+ L.SVG.include({
+ _updateXMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+
+ if (L.Browser.vml) {
+ latlng._round();
+ offset = Math.round(offset);
+ }
+
+ var str = 'M' + (latlng.x + offset) + ',' + (latlng.y + offset) +
+ 'L' + (latlng.x - offset) + ',' + (latlng.y - offset) +
+ 'M' + (latlng.x - offset) + ',' + (latlng.y + offset) +
+ 'L' + (latlng.x + offset) + ',' + (latlng.y - offset);
+
+ this._setPath(layer, str);
+ }
+ });
+ }
+ });
+
+ var xMarker = function (latlng, size, options) {
+ return new XMarker(latlng, size, options);
+ };
+
+ var SquareMarker = ShapeMarker.extend({
+ options: {
+ fill: true
+ },
+
+ initialize: function (latlng, size, options) {
+ ShapeMarker.prototype.initialize.call(this, latlng, size, options);
+ },
+
+ _updatePath: function () {
+ this._renderer._updateSquareMarker(this);
+ },
+
+ _svgCanvasIncludes: function () {
+ L.Canvas.include({
+ _updateSquareMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+ var ctx = this._ctx;
+
+ ctx.beginPath();
+
+ ctx.moveTo(latlng.x + offset, latlng.y + offset);
+ ctx.lineTo(latlng.x - offset, latlng.y + offset);
+ ctx.lineTo(latlng.x - offset, latlng.y - offset);
+ ctx.lineTo(latlng.x + offset, latlng.y - offset);
+
+ ctx.closePath();
+
+ this._fillStroke(ctx, layer);
+ }
+ });
+
+ L.SVG.include({
+ _updateSquareMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+
+ if (L.Browser.vml) {
+ latlng._round();
+ offset = Math.round(offset);
+ }
+
+ var str = 'M' + (latlng.x + offset) + ',' + (latlng.y + offset) +
+ 'L' + (latlng.x - offset) + ',' + (latlng.y + offset) +
+ 'L' + (latlng.x - offset) + ',' + (latlng.y - offset) +
+ 'L' + (latlng.x + offset) + ',' + (latlng.y - offset);
+
+ str = str + (L.Browser.svg ? 'z' : 'x');
+
+ this._setPath(layer, str);
+ }
+ });
+ }
+ });
+
+ var squareMarker = function (latlng, size, options) {
+ return new SquareMarker(latlng, size, options);
+ };
+
+ var DiamondMarker = ShapeMarker.extend({
+ options: {
+ fill: true
+ },
+
+ initialize: function (latlng, size, options) {
+ ShapeMarker.prototype.initialize.call(this, latlng, size, options);
+ },
+
+ _updatePath: function () {
+ this._renderer._updateDiamondMarker(this);
+ },
+
+ _svgCanvasIncludes: function () {
+ L.Canvas.include({
+ _updateDiamondMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+ var ctx = this._ctx;
+
+ ctx.beginPath();
+
+ ctx.moveTo(latlng.x, latlng.y + offset);
+ ctx.lineTo(latlng.x - offset, latlng.y);
+ ctx.lineTo(latlng.x, latlng.y - offset);
+ ctx.lineTo(latlng.x + offset, latlng.y);
+
+ ctx.closePath();
+
+ this._fillStroke(ctx, layer);
+ }
+ });
+
+ L.SVG.include({
+ _updateDiamondMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+
+ if (L.Browser.vml) {
+ latlng._round();
+ offset = Math.round(offset);
+ }
+
+ var str = 'M' + latlng.x + ',' + (latlng.y + offset) +
+ 'L' + (latlng.x - offset) + ',' + latlng.y +
+ 'L' + latlng.x + ',' + (latlng.y - offset) +
+ 'L' + (latlng.x + offset) + ',' + latlng.y;
+
+ str = str + (L.Browser.svg ? 'z' : 'x');
+
+ this._setPath(layer, str);
+ }
+ });
+ }
+ });
+
+ var diamondMarker = function (latlng, size, options) {
+ return new DiamondMarker(latlng, size, options);
+ };
+
+ var PointSymbol = Symbol.extend({
+
+ statics: {
+ MARKERTYPES: ['esriSMSCircle', 'esriSMSCross', 'esriSMSDiamond', 'esriSMSSquare', 'esriSMSX', 'esriPMS']
+ },
+
+ initialize: function (symbolJson, options) {
+ var url;
+ Symbol.prototype.initialize.call(this, symbolJson, options);
+ if (options) {
+ this.serviceUrl = options.url;
+ }
+ if (symbolJson) {
+ if (symbolJson.type === 'esriPMS') {
+ var imageUrl = this._symbolJson.url;
+ if ((imageUrl && imageUrl.substr(0, 7) === 'http://') || (imageUrl.substr(0, 8) === 'https://')) {
+ // web image
+ url = this.sanitize(imageUrl);
+ this._iconUrl = url;
+ } else {
+ url = this.serviceUrl + 'images/' + imageUrl;
+ this._iconUrl = options && options.token ? url + '?token=' + options.token : url;
+ }
+ if (symbolJson.imageData) {
+ this._iconUrl = 'data:' + symbolJson.contentType + ';base64,' + symbolJson.imageData;
+ }
+ // leaflet does not allow resizing icons so keep a hash of different
+ // icon sizes to try and keep down on the number of icons created
+ this._icons = {};
+ // create base icon
+ this.icon = this._createIcon(this._symbolJson);
+ } else {
+ this._fillStyles();
+ }
+ }
+ },
+
+ // prevent html injection in strings
+ sanitize: function (str) {
+ if (!str) {
+ return '';
+ }
+ var text;
+ try {
+ // removes html but leaves url link text
+ text = str.replace(/
/gi, '\n');
+ text = text.replace(/
/gi, '\n');
+ text = text.replace(/(.*?)<\/a>/gi, ' $2 ($1) ');
+ text = text.replace(/<(?:.|\s)*?>/g, '');
+ } catch (ex) {
+ text = null;
+ }
+ return text;
+ },
+
+ _fillStyles: function () {
+ if (this._symbolJson.outline && this._symbolJson.size > 0 && this._symbolJson.outline.style !== 'esriSLSNull') {
+ this._styles.stroke = true;
+ this._styles.weight = this.pixelValue(this._symbolJson.outline.width);
+ this._styles.color = this.colorValue(this._symbolJson.outline.color);
+ this._styles.opacity = this.alphaValue(this._symbolJson.outline.color);
+ } else {
+ this._styles.stroke = false;
+ }
+ if (this._symbolJson.color) {
+ this._styles.fillColor = this.colorValue(this._symbolJson.color);
+ this._styles.fillOpacity = this.alphaValue(this._symbolJson.color);
+ } else {
+ this._styles.fillOpacity = 0;
+ }
+
+ if (this._symbolJson.style === 'esriSMSCircle') {
+ this._styles.radius = this.pixelValue(this._symbolJson.size) / 2.0;
+ }
+ },
+
+ _createIcon: function (options) {
+ var width = this.pixelValue(options.width);
+ var height = width;
+ if (options.height) {
+ height = this.pixelValue(options.height);
+ }
+ var xOffset = width / 2.0;
+ var yOffset = height / 2.0;
+
+ if (options.xoffset) {
+ xOffset += this.pixelValue(options.xoffset);
+ }
+ if (options.yoffset) {
+ yOffset += this.pixelValue(options.yoffset);
+ }
+
+ var icon = L.icon({
+ iconUrl: this._iconUrl,
+ iconSize: [width, height],
+ iconAnchor: [xOffset, yOffset]
+ });
+ this._icons[options.width.toString()] = icon;
+ return icon;
+ },
+
+ _getIcon: function (size) {
+ // check to see if it is already created by size
+ var icon = this._icons[size.toString()];
+ if (!icon) {
+ icon = this._createIcon({width: size});
+ }
+ return icon;
+ },
+
+ pointToLayer: function (geojson, latlng, visualVariables, options) {
+ var size = this._symbolJson.size || this._symbolJson.width;
+ if (!this._isDefault) {
+ if (visualVariables.sizeInfo) {
+ var calculatedSize = this.getSize(geojson, visualVariables.sizeInfo);
+ if (calculatedSize) {
+ size = calculatedSize;
+ }
+ }
+ if (visualVariables.colorInfo) {
+ var color = this.getColor(geojson, visualVariables.colorInfo);
+ if (color) {
+ this._styles.fillColor = this.colorValue(color);
+ this._styles.fillOpacity = this.alphaValue(color);
+ }
+ }
+ }
+
+ if (this._symbolJson.type === 'esriPMS') {
+ var layerOptions = L.extend({}, {icon: this._getIcon(size)}, options);
+ return L.marker(latlng, layerOptions);
+ }
+ size = this.pixelValue(size);
+
+ switch (this._symbolJson.style) {
+ case 'esriSMSSquare':
+ return squareMarker(latlng, size, L.extend({}, this._styles, options));
+ case 'esriSMSDiamond':
+ return diamondMarker(latlng, size, L.extend({}, this._styles, options));
+ case 'esriSMSCross':
+ return crossMarker(latlng, size, L.extend({}, this._styles, options));
+ case 'esriSMSX':
+ return xMarker(latlng, size, L.extend({}, this._styles, options));
+ }
+ this._styles.radius = size / 2.0;
+ return L.circleMarker(latlng, L.extend({}, this._styles, options));
+ }
+ });
+
+ function pointSymbol (symbolJson, options) {
+ return new PointSymbol(symbolJson, options);
+ }
+
+ var LineSymbol = Symbol.extend({
+ statics: {
+ // Not implemented 'esriSLSNull'
+ LINETYPES: ['esriSLSDash', 'esriSLSDot', 'esriSLSDashDotDot', 'esriSLSDashDot', 'esriSLSSolid']
+ },
+ initialize: function (symbolJson, options) {
+ Symbol.prototype.initialize.call(this, symbolJson, options);
+ this._fillStyles();
+ },
+
+ _fillStyles: function () {
+ // set the defaults that show up on arcgis online
+ this._styles.lineCap = 'butt';
+ this._styles.lineJoin = 'miter';
+ this._styles.fill = false;
+ this._styles.weight = 0;
+
+ if (!this._symbolJson) {
+ return this._styles;
+ }
+
+ if (this._symbolJson.color) {
+ this._styles.color = this.colorValue(this._symbolJson.color);
+ this._styles.opacity = this.alphaValue(this._symbolJson.color);
+ }
+
+ if (!isNaN(this._symbolJson.width)) {
+ this._styles.weight = this.pixelValue(this._symbolJson.width);
+
+ var dashValues = [];
+
+ switch (this._symbolJson.style) {
+ case 'esriSLSDash':
+ dashValues = [4, 3];
+ break;
+ case 'esriSLSDot':
+ dashValues = [1, 3];
+ break;
+ case 'esriSLSDashDot':
+ dashValues = [8, 3, 1, 3];
+ break;
+ case 'esriSLSDashDotDot':
+ dashValues = [8, 3, 1, 3, 1, 3];
+ break;
+ }
+
+ // use the dash values and the line weight to set dash array
+ if (dashValues.length > 0) {
+ for (var i = 0; i < dashValues.length; i++) {
+ dashValues[i] *= this._styles.weight;
+ }
+
+ this._styles.dashArray = dashValues.join(',');
+ }
+ }
+ },
+
+ style: function (feature, visualVariables) {
+ if (!this._isDefault && visualVariables) {
+ if (visualVariables.sizeInfo) {
+ var calculatedSize = this.pixelValue(this.getSize(feature, visualVariables.sizeInfo));
+ if (calculatedSize) {
+ this._styles.weight = calculatedSize;
+ }
+ }
+ if (visualVariables.colorInfo) {
+ var color = this.getColor(feature, visualVariables.colorInfo);
+ if (color) {
+ this._styles.color = this.colorValue(color);
+ this._styles.opacity = this.alphaValue(color);
+ }
+ }
+ }
+ return this._styles;
+ }
+ });
+
+ function lineSymbol (symbolJson, options) {
+ return new LineSymbol(symbolJson, options);
+ }
+
+ var PolygonSymbol = Symbol.extend({
+ statics: {
+ // not implemented: 'esriSFSBackwardDiagonal','esriSFSCross','esriSFSDiagonalCross','esriSFSForwardDiagonal','esriSFSHorizontal','esriSFSNull','esriSFSVertical'
+ POLYGONTYPES: ['esriSFSSolid']
+ },
+ initialize: function (symbolJson, options) {
+ Symbol.prototype.initialize.call(this, symbolJson, options);
+ if (symbolJson) {
+ if (symbolJson.outline && symbolJson.outline.style === 'esriSLSNull') {
+ this._lineStyles = { weight: 0 };
+ } else {
+ this._lineStyles = lineSymbol(symbolJson.outline, options).style();
+ }
+ this._fillStyles();
+ }
+ },
+
+ _fillStyles: function () {
+ if (this._lineStyles) {
+ if (this._lineStyles.weight === 0) {
+ // when weight is 0, setting the stroke to false can still look bad
+ // (gaps between the polygons)
+ this._styles.stroke = false;
+ } else {
+ // copy the line symbol styles into this symbol's styles
+ for (var styleAttr in this._lineStyles) {
+ this._styles[styleAttr] = this._lineStyles[styleAttr];
+ }
+ }
+ }
+
+ // set the fill for the polygon
+ if (this._symbolJson) {
+ if (this._symbolJson.color &&
+ // don't fill polygon if type is not supported
+ PolygonSymbol.POLYGONTYPES.indexOf(this._symbolJson.style >= 0)) {
+ this._styles.fill = true;
+ this._styles.fillColor = this.colorValue(this._symbolJson.color);
+ this._styles.fillOpacity = this.alphaValue(this._symbolJson.color);
+ } else {
+ this._styles.fill = false;
+ this._styles.fillOpacity = 0;
+ }
+ }
+ },
+
+ style: function (feature, visualVariables) {
+ if (!this._isDefault && visualVariables && visualVariables.colorInfo) {
+ var color = this.getColor(feature, visualVariables.colorInfo);
+ if (color) {
+ this._styles.fillColor = this.colorValue(color);
+ this._styles.fillOpacity = this.alphaValue(color);
+ }
+ }
+ return this._styles;
+ }
+ });
+
+ function polygonSymbol (symbolJson, options) {
+ return new PolygonSymbol(symbolJson, options);
+ }
+
+ var Renderer = L.Class.extend({
+ options: {
+ proportionalPolygon: false,
+ clickable: true
+ },
+
+ initialize: function (rendererJson, options) {
+ this._rendererJson = rendererJson;
+ this._pointSymbols = false;
+ this._symbols = [];
+ this._visualVariables = this._parseVisualVariables(rendererJson.visualVariables);
+ L.Util.setOptions(this, options);
+ },
+
+ _parseVisualVariables: function (visualVariables) {
+ var visVars = {};
+ if (visualVariables) {
+ for (var i = 0; i < visualVariables.length; i++) {
+ visVars[visualVariables[i].type] = visualVariables[i];
+ }
+ }
+ return visVars;
+ },
+
+ _createDefaultSymbol: function () {
+ if (this._rendererJson.defaultSymbol) {
+ this._defaultSymbol = this._newSymbol(this._rendererJson.defaultSymbol);
+ this._defaultSymbol._isDefault = true;
+ }
+ },
+
+ _newSymbol: function (symbolJson) {
+ if (symbolJson.type === 'esriSMS' || symbolJson.type === 'esriPMS') {
+ this._pointSymbols = true;
+ return pointSymbol(symbolJson, this.options);
+ }
+ if (symbolJson.type === 'esriSLS') {
+ return lineSymbol(symbolJson, this.options);
+ }
+ if (symbolJson.type === 'esriSFS') {
+ return polygonSymbol(symbolJson, this.options);
+ }
+ },
+
+ _getSymbol: function () {
+ // override
+ },
+
+ attachStylesToLayer: function (layer) {
+ if (this._pointSymbols) {
+ layer.options.pointToLayer = L.Util.bind(this.pointToLayer, this);
+ } else {
+ layer.options.style = L.Util.bind(this.style, this);
+ layer._originalStyle = layer.options.style;
+ }
+ },
+
+ pointToLayer: function (geojson, latlng) {
+ var sym = this._getSymbol(geojson);
+ if (sym && sym.pointToLayer) {
+ // right now custom panes are the only option pushed through
+ return sym.pointToLayer(geojson, latlng, this._visualVariables, this.options);
+ }
+ // invisible symbology
+ return L.circleMarker(latlng, {radius: 0, opacity: 0});
+ },
+
+ style: function (feature) {
+ var userStyles;
+ if (this.options.userDefinedStyle) {
+ userStyles = this.options.userDefinedStyle(feature);
+ }
+ // find the symbol to represent this feature
+ var sym = this._getSymbol(feature);
+ if (sym) {
+ return this.mergeStyles(sym.style(feature, this._visualVariables), userStyles);
+ } else {
+ // invisible symbology
+ return this.mergeStyles({opacity: 0, fillOpacity: 0}, userStyles);
+ }
+ },
+
+ mergeStyles: function (styles, userStyles) {
+ var mergedStyles = {};
+ var attr;
+ // copy renderer style attributes
+ for (attr in styles) {
+ if (styles.hasOwnProperty(attr)) {
+ mergedStyles[attr] = styles[attr];
+ }
+ }
+ // override with user defined style attributes
+ if (userStyles) {
+ for (attr in userStyles) {
+ if (userStyles.hasOwnProperty(attr)) {
+ mergedStyles[attr] = userStyles[attr];
+ }
+ }
+ }
+ return mergedStyles;
+ }
+ });
+
+ var SimpleRenderer = Renderer.extend({
+ initialize: function (rendererJson, options) {
+ Renderer.prototype.initialize.call(this, rendererJson, options);
+ this._createSymbol();
+ },
+
+ _createSymbol: function () {
+ if (this._rendererJson.symbol) {
+ this._symbols.push(this._newSymbol(this._rendererJson.symbol));
+ }
+ },
+
+ _getSymbol: function () {
+ return this._symbols[0];
+ }
+ });
+
+ function simpleRenderer (rendererJson, options) {
+ return new SimpleRenderer(rendererJson, options);
+ }
+
+ var ClassBreaksRenderer = Renderer.extend({
+ initialize: function (rendererJson, options) {
+ Renderer.prototype.initialize.call(this, rendererJson, options);
+ this._field = this._rendererJson.field;
+ if (this._rendererJson.normalizationType && this._rendererJson.normalizationType === 'esriNormalizeByField') {
+ this._normalizationField = this._rendererJson.normalizationField;
+ }
+ this._createSymbols();
+ },
+
+ _createSymbols: function () {
+ var symbol;
+ var classbreaks = this._rendererJson.classBreakInfos;
+
+ this._symbols = [];
+
+ // create a symbol for each class break
+ for (var i = classbreaks.length - 1; i >= 0; i--) {
+ if (this.options.proportionalPolygon && this._rendererJson.backgroundFillSymbol) {
+ symbol = this._newSymbol(this._rendererJson.backgroundFillSymbol);
+ } else {
+ symbol = this._newSymbol(classbreaks[i].symbol);
+ }
+ symbol.val = classbreaks[i].classMaxValue;
+ this._symbols.push(symbol);
+ }
+ // sort the symbols in ascending value
+ this._symbols.sort(function (a, b) {
+ return a.val > b.val ? 1 : -1;
+ });
+ this._createDefaultSymbol();
+ this._maxValue = this._symbols[this._symbols.length - 1].val;
+ },
+
+ _getSymbol: function (feature) {
+ var val = feature.properties[this._field];
+ if (this._normalizationField) {
+ var normValue = feature.properties[this._normalizationField];
+ if (!isNaN(normValue) && normValue !== 0) {
+ val = val / normValue;
+ } else {
+ return this._defaultSymbol;
+ }
+ }
+
+ if (val > this._maxValue) {
+ return this._defaultSymbol;
+ }
+ var symbol = this._symbols[0];
+ for (var i = this._symbols.length - 1; i >= 0; i--) {
+ if (val > this._symbols[i].val) {
+ break;
+ }
+ symbol = this._symbols[i];
+ }
+ return symbol;
+ }
+ });
+
+ function classBreaksRenderer (rendererJson, options) {
+ return new ClassBreaksRenderer(rendererJson, options);
+ }
+
+ var UniqueValueRenderer = Renderer.extend({
+ initialize: function (rendererJson, options) {
+ Renderer.prototype.initialize.call(this, rendererJson, options);
+ this._field = this._rendererJson.field1;
+ this._createSymbols();
+ },
+
+ _createSymbols: function () {
+ var symbol;
+ var uniques = this._rendererJson.uniqueValueInfos;
+
+ // create a symbol for each unique value
+ for (var i = uniques.length - 1; i >= 0; i--) {
+ symbol = this._newSymbol(uniques[i].symbol);
+ symbol.val = uniques[i].value;
+ this._symbols.push(symbol);
+ }
+ this._createDefaultSymbol();
+ },
+
+ _getSymbol: function (feature) {
+ var val = feature.properties[this._field];
+ // accumulate values if there is more than one field defined
+ if (this._rendererJson.fieldDelimiter && this._rendererJson.field2) {
+ var val2 = feature.properties[this._rendererJson.field2];
+ if (val2) {
+ val += this._rendererJson.fieldDelimiter + val2;
+ var val3 = feature.properties[this._rendererJson.field3];
+ if (val3) {
+ val += this._rendererJson.fieldDelimiter + val3;
+ }
+ }
+ }
+
+ var symbol = this._defaultSymbol;
+ for (var i = this._symbols.length - 1; i >= 0; i--) {
+ // using the === operator does not work if the field
+ // of the unique renderer is not a string
+ /*eslint-disable */
+ if (this._symbols[i].val == val) {
+ symbol = this._symbols[i];
+ }
+ /*eslint-enable */
+ }
+ return symbol;
+ }
+ });
+
+ function uniqueValueRenderer (rendererJson, options) {
+ return new UniqueValueRenderer(rendererJson, options);
+ }
+
+ Esri.FeatureLayer.addInitHook(function () {
+ if (this.options.ignoreRenderer) {
+ return;
+ }
+ var oldOnAdd = L.Util.bind(this.onAdd, this);
+ var oldUnbindPopup = L.Util.bind(this.unbindPopup, this);
+ var oldOnRemove = L.Util.bind(this.onRemove, this);
+ L.Util.bind(this.createNewLayer, this);
+
+ this.onAdd = function (map) {
+ this.metadata(function (error, response) {
+ if (error) {
+ console.warn('failed to load metadata from the service.');
+ return;
+ } if (response && response.drawingInfo) {
+ if (this.options.drawingInfo) {
+ // allow L.esri.webmap (and others) to override service symbology with info provided in layer constructor
+ response.drawingInfo = this.options.drawingInfo;
+ }
+
+ // the default pane for lines and polygons is 'overlayPane', for points it is 'markerPane'
+ if (this.options.pane === 'overlayPane' && response.geometryType === 'esriGeometryPoint') {
+ this.options.pane = 'markerPane';
+ }
+
+ this._setRenderers(response);
+ oldOnAdd(map);
+ this._addPointLayer(map);
+ }
+ }, this);
+ };
+
+ this.onRemove = function (map) {
+ oldOnRemove(map);
+ if (this._pointLayer) {
+ var pointLayers = this._pointLayer.getLayers();
+ for (var i in pointLayers) {
+ map.removeLayer(pointLayers[i]);
+ }
+ }
+ };
+
+ this.unbindPopup = function () {
+ oldUnbindPopup();
+ if (this._pointLayer) {
+ var pointLayers = this._pointLayer.getLayers();
+ for (var i in pointLayers) {
+ pointLayers[i].unbindPopup();
+ }
+ }
+ };
+
+ this._addPointLayer = function (map) {
+ if (this._pointLayer) {
+ this._pointLayer.addTo(map);
+ this._pointLayer.bringToFront();
+ }
+ };
+
+ this._createPointLayer = function () {
+ if (!this._pointLayer) {
+ this._pointLayer = L.geoJson();
+ // store the feature ids that have already been added to the map
+ this._pointLayerIds = {};
+
+ if (this._popup) {
+ var popupFunction = function (feature, layer) {
+ layer.bindPopup(this._popup(feature, layer), this._popupOptions);
+ };
+ this._pointLayer.options.onEachFeature = L.Util.bind(popupFunction, this);
+ }
+ }
+ };
+
+ this.createNewLayer = function (geojson) {
+ var fLayer = L.GeoJSON.geometryToLayer(geojson, this.options);
+
+ // add a point layer when the polygon is represented as proportional marker symbols
+ if (this._hasProportionalSymbols) {
+ var centroid = this.getPolygonCentroid(geojson.geometry.coordinates);
+ if (!(isNaN(centroid[0]) || isNaN(centroid[0]))) {
+ this._createPointLayer();
+
+ var featureId = geojson.id.toString();
+ // only add the feature if it does not already exist on the map
+ if (!this._pointLayerIds[featureId]) {
+ var pointjson = this.getPointJson(geojson, centroid);
+
+ this._pointLayer.addData(pointjson);
+ this._pointLayerIds[featureId] = true;
+ }
+
+ this._pointLayer.bringToFront();
+ }
+ }
+ return fLayer;
+ };
+
+ this.getPolygonCentroid = function (coordinates) {
+ var pts = coordinates[0][0];
+ if (pts.length === 2) {
+ pts = coordinates[0];
+ }
+
+ var twicearea = 0;
+ var x = 0;
+ var y = 0;
+ var nPts = pts.length;
+ var p1;
+ var p2;
+ var f;
+
+ for (var i = 0, j = nPts - 1; i < nPts; j = i++) {
+ p1 = pts[i]; p2 = pts[j];
+ twicearea += p1[0] * p2[1];
+ twicearea -= p1[1] * p2[0];
+ f = p1[0] * p2[1] - p2[0] * p1[1];
+ x += (p1[0] + p2[0]) * f;
+ y += (p1[1] + p2[1]) * f;
+ }
+ f = twicearea * 3;
+ return [x / f, y / f];
+ };
+
+ this.getPointJson = function (geojson, centroid) {
+ return {
+ type: 'Feature',
+ properties: geojson.properties,
+ id: geojson.id,
+ geometry: {
+ type: 'Point',
+ coordinates: [centroid[0], centroid[1]]
+ }
+ };
+ };
+
+ this._checkForProportionalSymbols = function (geometryType, renderer) {
+ this._hasProportionalSymbols = false;
+ if (geometryType === 'esriGeometryPolygon') {
+ if (renderer.backgroundFillSymbol) {
+ this._hasProportionalSymbols = true;
+ }
+ // check to see if the first symbol in the classbreaks is a marker symbol
+ if (renderer.classBreakInfos && renderer.classBreakInfos.length) {
+ var sym = renderer.classBreakInfos[0].symbol;
+ if (sym && (sym.type === 'esriSMS' || sym.type === 'esriPMS')) {
+ this._hasProportionalSymbols = true;
+ }
+ }
+ }
+ };
+
+ this._setRenderers = function (serviceInfo) {
+ var rend;
+ var rendererInfo = serviceInfo.drawingInfo.renderer;
+
+ var options = {
+ url: this.options.url
+ };
+
+ if (this.options.token) {
+ options.token = this.options.token;
+ }
+
+ if (this.options.pane) {
+ options.pane = this.options.pane;
+ }
+
+ if (serviceInfo.drawingInfo.transparency) {
+ options.layerTransparency = serviceInfo.drawingInfo.transparency;
+ }
+
+ if (this.options.style) {
+ options.userDefinedStyle = this.options.style;
+ }
+
+ switch (rendererInfo.type) {
+ case 'classBreaks':
+ this._checkForProportionalSymbols(serviceInfo.geometryType, rendererInfo);
+ if (this._hasProportionalSymbols) {
+ this._createPointLayer();
+ var pRend = classBreaksRenderer(rendererInfo, options);
+ pRend.attachStylesToLayer(this._pointLayer);
+ options.proportionalPolygon = true;
+ }
+ rend = classBreaksRenderer(rendererInfo, options);
+ break;
+ case 'uniqueValue':
+ rend = uniqueValueRenderer(rendererInfo, options);
+ break;
+ default:
+ rend = simpleRenderer(rendererInfo, options);
+ }
+ rend.attachStylesToLayer(this);
+ };
+ });
+
+ exports.VERSION = version;
+ exports.Renderer = Renderer;
+ exports.SimpleRenderer = SimpleRenderer;
+ exports.simpleRenderer = simpleRenderer;
+ exports.ClassBreaksRenderer = ClassBreaksRenderer;
+ exports.classBreaksRenderer = classBreaksRenderer;
+ exports.UniqueValueRenderer = UniqueValueRenderer;
+ exports.uniqueValueRenderer = uniqueValueRenderer;
+ exports.Symbol = Symbol;
+ exports.PointSymbol = PointSymbol;
+ exports.pointSymbol = pointSymbol;
+ exports.LineSymbol = LineSymbol;
+ exports.lineSymbol = lineSymbol;
+ exports.PolygonSymbol = PolygonSymbol;
+ exports.polygonSymbol = polygonSymbol;
+
+}));
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNyaS1sZWFmbGV0LXJlbmRlcmVycy1kZWJ1Zy5qcyIsInNvdXJjZXMiOlsiLi4vcGFja2FnZS5qc29uIiwiLi4vc3JjL1N5bWJvbHMvU3ltYm9sLmpzIiwiLi4vbm9kZV9tb2R1bGVzL2xlYWZsZXQtc2hhcGUtbWFya2Vycy9zcmMvU2hhcGVNYXJrZXIuanMiLCIuLi9ub2RlX21vZHVsZXMvbGVhZ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SxDQUFBLFVBQVUsS0FBSyxDQUFDLG1CQUFtQixDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUN0RCxDQUFBLFVBQVUsT0FBTyxDQUFDLG1CQUFtQixHQUFHLElBQUksQ0FBQztBQUM3QyxDQUFBLFNBQVM7QUFDVCxDQUFBLFFBQVEsSUFBSSxHQUFHLG1CQUFtQixDQUFDLFlBQVksRUFBRSxPQUFPLENBQUMsQ0FBQztBQUMxRCxDQUFBLFFBQVEsTUFBTTtBQUNkLENBQUEsTUFBTSxLQUFLLGFBQWE7QUFDeEIsQ0FBQSxRQUFRLElBQUksR0FBRyxtQkFBbUIsQ0FBQyxZQUFZLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDMUQsQ0FBQSxRQUFRLE1BQU07QUFDZCxDQUFBLE1BQU07QUFDTixDQUFBLFFBQVEsSUFBSSxHQUFHLGNBQWMsQ0FBQyxZQUFZLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDckQsQ0FBQSxLQUFLO0FBQ0wsQ0FBQSxJQUFJLElBQUksQ0FBQyxtQkFBbUIsQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNuQyxDQUFBLEdBQUcsQ0FBQztBQUNKLENBQUEsQ0FBQyxDQUFDLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
\ No newline at end of file
diff --git a/dist/esri-leaflet-renderers.js b/dist/esri-leaflet-renderers.js
new file mode 100644
index 0000000..2b83f23
--- /dev/null
+++ b/dist/esri-leaflet-renderers.js
@@ -0,0 +1,5 @@
+/* esri-leaflet-renderers - v2.0.5 - Fri Jun 02 2017 09:54:10 GMT-0700 (PDT)
+ * Copyright (c) 2017 Environmental Systems Research Institute, Inc.
+ * Apache-2.0 */
+!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("leaflet"),require("esri-leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet","esri-leaflet"],i):i((t.L=t.L||{},t.L.esri=t.L.esri||{},t.L.esri.Renderers=t.L.esri.Renderers||{}),t.L,t.L.esri)}(this,function(t,i,e){"use strict";function s(t,i){return new b(t,i)}function o(t,i){return new v(t,i)}function n(t,i){return new g(t,i)}function r(t,i){return new x(t,i)}function l(t,i){return new z(t,i)}function a(t,i){return new P(t,i)}i="default"in i?i.default:i,e="default"in e?e.default:e;var h=i.Class.extend({initialize:function(t,i){this._symbolJson=t,this.val=null,this._styles={},this._isDefault=!1,this._layerTransparency=1,i&&i.layerTransparency&&(this._layerTransparency=1-i.layerTransparency/100)},pixelValue:function(t){return 1.333*t},colorValue:function(t){return"rgb("+t[0]+","+t[1]+","+t[2]+")"},alphaValue:function(t){return t[3]/255*this._layerTransparency},getSize:function(t,i){var e=t.properties,s=i.field,o=0,n=null;if(s){n=e[s];var r,l=i.minSize,a=i.maxSize,h=i.minDataValue,u=i.maxDataValue,y=i.normalizationField,_=e?parseFloat(e[y]):void 0;if(null===n||y&&(isNaN(_)||0===_))return null;isNaN(_)||(n/=_),null!==l&&null!==a&&null!==h&&null!==u&&(n<=h?o=l:n>=u?o=a:(r=(n-h)/(u-h),o=l+r*(a-l))),o=isNaN(o)?0:o}return o},getColor:function(t,i){if(!(t.properties&&i&&i.field&&i.stops))return null;var e,s,o,n,r=t.properties,l=r[i.field],a=i.normalizationField,h=r?parseFloat(r[a]):void 0;if(null===l||a&&(isNaN(h)||0===h))return null;if(isNaN(h)||(l/=h),l<=i.stops[0].value)return i.stops[0].color;var u=i.stops[i.stops.length-1];if(l>=u.value)return u.color;for(var y=0;yl){s=_.color,n=_.value;break}}if(!isNaN(o)&&!isNaN(n)){var c=n-o;if(c>0){var f=(l-o)/c;if(f){var p=(n-l)/c;if(p){for(var d=[],S=0;S<4;S++)d[S]=Math.round(e[S]*p)+s[S]*f;return d}return s}return e}}return null}}),u=i.Path.extend({initialize:function(t,e,s){i.setOptions(this,s),this._size=e,this._latlng=i.latLng(t),this._svgCanvasIncludes()},toGeoJSON:function(){return i.GeoJSON.getFeature(this,{type:"Point",coordinates:i.GeoJSON.latLngToCoords(this.getLatLng())})},_svgCanvasIncludes:function(){},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&this._updatePath()},_updatePath:function(){},setLatLng:function(t){return this._latlng=i.latLng(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setSize:function(t){return this._size=t,this.redraw()},getSize:function(){return this._size}}),y=u.extend({initialize:function(t,i,e){u.prototype.initialize.call(this,t,i,e)},_updatePath:function(){this._renderer._updateCrossMarker(this)},_svgCanvasIncludes:function(){i.Canvas.include({_updateCrossMarker:function(t){var i=t._point,e=t._size/2,s=this._ctx;s.beginPath(),s.moveTo(i.x,i.y+e),s.lineTo(i.x,i.y-e),this._fillStroke(s,t),s.moveTo(i.x-e,i.y),s.lineTo(i.x+e,i.y),this._fillStroke(s,t)}}),i.SVG.include({_updateCrossMarker:function(t){var e=t._point,s=t._size/2;i.Browser.vml&&(e._round(),s=Math.round(s));var o="M"+e.x+","+(e.y+s)+"L"+e.x+","+(e.y-s)+"M"+(e.x-s)+","+e.y+"L"+(e.x+s)+","+e.y;this._setPath(t,o)}})}}),_=function(t,i,e){return new y(t,i,e)},c=u.extend({initialize:function(t,i,e){u.prototype.initialize.call(this,t,i,e)},_updatePath:function(){this._renderer._updateXMarker(this)},_svgCanvasIncludes:function(){i.Canvas.include({_updateXMarker:function(t){var i=t._point,e=t._size/2,s=this._ctx;s.beginPath(),s.moveTo(i.x+e,i.y+e),s.lineTo(i.x-e,i.y-e),this._fillStroke(s,t)}}),i.SVG.include({_updateXMarker:function(t){var e=t._point,s=t._size/2;i.Browser.vml&&(e._round(),s=Math.round(s));var o="M"+(e.x+s)+","+(e.y+s)+"L"+(e.x-s)+","+(e.y-s)+"M"+(e.x-s)+","+(e.y+s)+"L"+(e.x+s)+","+(e.y-s);this._setPath(t,o)}})}}),f=function(t,i,e){return new c(t,i,e)},p=u.extend({options:{fill:!0},initialize:function(t,i,e){u.prototype.initialize.call(this,t,i,e)},_updatePath:function(){this._renderer._updateSquareMarker(this)},_svgCanvasIncludes:function(){i.Canvas.include({_updateSquareMarker:function(t){var i=t._point,e=t._size/2,s=this._ctx;s.beginPath(),s.moveTo(i.x+e,i.y+e),s.lineTo(i.x-e,i.y+e),s.lineTo(i.x-e,i.y-e),s.lineTo(i.x+e,i.y-e),s.closePath(),this._fillStroke(s,t)}}),i.SVG.include({_updateSquareMarker:function(t){var e=t._point,s=t._size/2;i.Browser.vml&&(e._round(),s=Math.round(s));var o="M"+(e.x+s)+","+(e.y+s)+"L"+(e.x-s)+","+(e.y+s)+"L"+(e.x-s)+","+(e.y-s)+"L"+(e.x+s)+","+(e.y-s);o+=i.Browser.svg?"z":"x",this._setPath(t,o)}})}}),d=function(t,i,e){return new p(t,i,e)},S=u.extend({options:{fill:!0},initialize:function(t,i,e){u.prototype.initialize.call(this,t,i,e)},_updatePath:function(){this._renderer._updateDiamondMarker(this)},_svgCanvasIncludes:function(){i.Canvas.include({_updateDiamondMarker:function(t){var i=t._point,e=t._size/2,s=this._ctx;s.beginPath(),s.moveTo(i.x,i.y+e),s.lineTo(i.x-e,i.y),s.lineTo(i.x,i.y-e),s.lineTo(i.x+e,i.y),s.closePath(),this._fillStroke(s,t)}}),i.SVG.include({_updateDiamondMarker:function(t){var e=t._point,s=t._size/2;i.Browser.vml&&(e._round(),s=Math.round(s));var o="M"+e.x+","+(e.y+s)+"L"+(e.x-s)+","+e.y+"L"+e.x+","+(e.y-s)+"L"+(e.x+s)+","+e.y;o+=i.Browser.svg?"z":"x",this._setPath(t,o)}})}}),m=function(t,i,e){return new S(t,i,e)},b=h.extend({statics:{MARKERTYPES:["esriSMSCircle","esriSMSCross","esriSMSDiamond","esriSMSSquare","esriSMSX","esriPMS"]},initialize:function(t,i){var e;if(h.prototype.initialize.call(this,t,i),i&&(this.serviceUrl=i.url),t)if("esriPMS"===t.type){var s=this._symbolJson.url;s&&"http://"===s.substr(0,7)||"https://"===s.substr(0,8)?(e=this.sanitize(s),this._iconUrl=e):(e=this.serviceUrl+"images/"+s,this._iconUrl=i&&i.token?e+"?token="+i.token:e),t.imageData&&(this._iconUrl="data:"+t.contentType+";base64,"+t.imageData),this._icons={},this.icon=this._createIcon(this._symbolJson)}else this._fillStyles()},sanitize:function(t){if(!t)return"";var i;try{i=t.replace(/
/gi,"\n"),i=i.replace(//gi,"\n"),i=i.replace(/(.*?)<\/a>/gi," $2 ($1) "),i=i.replace(/<(?:.|\s)*?>/g,"")}catch(t){i=null}return i},_fillStyles:function(){this._symbolJson.outline&&this._symbolJson.size>0&&"esriSLSNull"!==this._symbolJson.outline.style?(this._styles.stroke=!0,this._styles.weight=this.pixelValue(this._symbolJson.outline.width),this._styles.color=this.colorValue(this._symbolJson.outline.color),this._styles.opacity=this.alphaValue(this._symbolJson.outline.color)):this._styles.stroke=!1,this._symbolJson.color?(this._styles.fillColor=this.colorValue(this._symbolJson.color),this._styles.fillOpacity=this.alphaValue(this._symbolJson.color)):this._styles.fillOpacity=0,"esriSMSCircle"===this._symbolJson.style&&(this._styles.radius=this.pixelValue(this._symbolJson.size)/2)},_createIcon:function(t){var e=this.pixelValue(t.width),s=e;t.height&&(s=this.pixelValue(t.height));var o=e/2,n=s/2;t.xoffset&&(o+=this.pixelValue(t.xoffset)),t.yoffset&&(n+=this.pixelValue(t.yoffset));var r=i.icon({iconUrl:this._iconUrl,iconSize:[e,s],iconAnchor:[o,n]});return this._icons[t.width.toString()]=r,r},_getIcon:function(t){var i=this._icons[t.toString()];return i||(i=this._createIcon({width:t})),i},pointToLayer:function(t,e,s,o){var n=this._symbolJson.size||this._symbolJson.width;if(!this._isDefault){if(s.sizeInfo){var r=this.getSize(t,s.sizeInfo);r&&(n=r)}if(s.colorInfo){var l=this.getColor(t,s.colorInfo);l&&(this._styles.fillColor=this.colorValue(l),this._styles.fillOpacity=this.alphaValue(l))}}if("esriPMS"===this._symbolJson.type){var a=i.extend({},{icon:this._getIcon(n)},o);return i.marker(e,a)}switch(n=this.pixelValue(n),this._symbolJson.style){case"esriSMSSquare":return d(e,n,i.extend({},this._styles,o));case"esriSMSDiamond":return m(e,n,i.extend({},this._styles,o));case"esriSMSCross":return _(e,n,i.extend({},this._styles,o));case"esriSMSX":return f(e,n,i.extend({},this._styles,o))}return this._styles.radius=n/2,i.circleMarker(e,i.extend({},this._styles,o))}}),v=h.extend({statics:{LINETYPES:["esriSLSDash","esriSLSDot","esriSLSDashDotDot","esriSLSDashDot","esriSLSSolid"]},initialize:function(t,i){h.prototype.initialize.call(this,t,i),this._fillStyles()},_fillStyles:function(){if(this._styles.lineCap="butt",this._styles.lineJoin="miter",this._styles.fill=!1,this._styles.weight=0,!this._symbolJson)return this._styles;if(this._symbolJson.color&&(this._styles.color=this.colorValue(this._symbolJson.color),this._styles.opacity=this.alphaValue(this._symbolJson.color)),!isNaN(this._symbolJson.width)){this._styles.weight=this.pixelValue(this._symbolJson.width);var t=[];switch(this._symbolJson.style){case"esriSLSDash":t=[4,3];break;case"esriSLSDot":t=[1,3];break;case"esriSLSDashDot":t=[8,3,1,3];break;case"esriSLSDashDotDot":t=[8,3,1,3,1,3]}if(t.length>0){for(var i=0;i=0)?(this._styles.fill=!0,this._styles.fillColor=this.colorValue(this._symbolJson.color),this._styles.fillOpacity=this.alphaValue(this._symbolJson.color)):(this._styles.fill=!1,this._styles.fillOpacity=0))},style:function(t,i){if(!this._isDefault&&i&&i.colorInfo){var e=this.getColor(t,i.colorInfo);e&&(this._styles.fillColor=this.colorValue(e),this._styles.fillOpacity=this.alphaValue(e))}return this._styles}}),L=i.Class.extend({options:{proportionalPolygon:!1,clickable:!0},initialize:function(t,e){this._rendererJson=t,this._pointSymbols=!1,this._symbols=[],this._visualVariables=this._parseVisualVariables(t.visualVariables),i.Util.setOptions(this,e)},_parseVisualVariables:function(t){var i={};if(t)for(var e=0;e=0;e--)t=this.options.proportionalPolygon&&this._rendererJson.backgroundFillSymbol?this._newSymbol(this._rendererJson.backgroundFillSymbol):this._newSymbol(i[e].symbol),t.val=i[e].classMaxValue,this._symbols.push(t);this._symbols.sort(function(t,i){return t.val>i.val?1:-1}),this._createDefaultSymbol(),this._maxValue=this._symbols[this._symbols.length-1].val},_getSymbol:function(t){var i=t.properties[this._field];if(this._normalizationField){var e=t.properties[this._normalizationField];if(isNaN(e)||0===e)return this._defaultSymbol;i/=e}if(i>this._maxValue)return this._defaultSymbol;for(var s=this._symbols[0],o=this._symbols.length-1;o>=0&&!(i>this._symbols[o].val);o--)s=this._symbols[o];return s}}),P=L.extend({initialize:function(t,i){L.prototype.initialize.call(this,t,i),this._field=this._rendererJson.field1,this._createSymbols()},_createSymbols:function(){for(var t,i=this._rendererJson.uniqueValueInfos,e=i.length-1;e>=0;e--)t=this._newSymbol(i[e].symbol),t.val=i[e].value,this._symbols.push(t);this._createDefaultSymbol()},_getSymbol:function(t){var i=t.properties[this._field];if(this._rendererJson.fieldDelimiter&&this._rendererJson.field2){var e=t.properties[this._rendererJson.field2];if(e){i+=this._rendererJson.fieldDelimiter+e;var s=t.properties[this._rendererJson.field3];s&&(i+=this._rendererJson.fieldDelimiter+s)}}for(var o=this._defaultSymbol,n=this._symbols.length-1;n>=0;n--)this._symbols[n].val==i&&(o=this._symbols[n]);return o}});e.FeatureLayer.addInitHook(function(){if(!this.options.ignoreRenderer){var t=i.Util.bind(this.onAdd,this),e=i.Util.bind(this.unbindPopup,this),s=i.Util.bind(this.onRemove,this);i.Util.bind(this.createNewLayer,this),this.onAdd=function(i){this.metadata(function(e,s){if(e)return void console.warn("failed to load metadata from the service.");s&&s.drawingInfo&&(this.options.drawingInfo&&(s.drawingInfo=this.options.drawingInfo),"overlayPane"===this.options.pane&&"esriGeometryPoint"===s.geometryType&&(this.options.pane="markerPane"),this._setRenderers(s),t(i),this._addPointLayer(i))},this)},this.onRemove=function(t){if(s(t),this._pointLayer){var i=this._pointLayer.getLayers();for(var e in i)t.removeLayer(i[e])}},this.unbindPopup=function(){if(e(),this._pointLayer){var t=this._pointLayer.getLayers();for(var i in t)t[i].unbindPopup()}},this._addPointLayer=function(t){this._pointLayer&&(this._pointLayer.addTo(t),this._pointLayer.bringToFront())},this._createPointLayer=function(){if(!this._pointLayer&&(this._pointLayer=i.geoJson(),this._pointLayerIds={},this._popup)){var t=function(t,i){i.bindPopup(this._popup(t,i),this._popupOptions)};this._pointLayer.options.onEachFeature=i.Util.bind(t,this)}},this.createNewLayer=function(t){var e=i.GeoJSON.geometryToLayer(t,this.options);if(this._hasProportionalSymbols){var s=this.getPolygonCentroid(t.geometry.coordinates);if(!isNaN(s[0])&&!isNaN(s[0])){this._createPointLayer();var o=t.id.toString();if(!this._pointLayerIds[o]){var n=this.getPointJson(t,s);this._pointLayer.addData(n),this._pointLayerIds[o]=!0}this._pointLayer.bringToFront()}}return e},this.getPolygonCentroid=function(t){var i=t[0][0];2===i.length&&(i=t[0]);for(var e,s,o,n=0,r=0,l=0,a=i.length,h=0,u=a-1;h\",\n \"bugs\": {\n \"url\": \"https://github.com/esri/esri-leaflet-renderers/issues\"\n },\n \"contributors\": [\n \"Rachel Nehmer \",\n \"John Gravois \"\n ],\n \"dependencies\": {\n \"esri-leaflet\": \"^2.0.0\",\n \"leaflet\": \"^1.0.0-rc.3\",\n \"leaflet-shape-markers\": \"^1.0.4\"\n },\n \"devDependencies\": {\n \"babelify\": \"^6.1.3\",\n \"chai\": \"3.5.0\",\n \"gh-release\": \"^2.0.0\",\n \"http-server\": \"^0.8.5\",\n \"isparta\": \"^4.0.0\",\n \"istanbul\": \"^0.4.2\",\n \"karma\": \"^1.3.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\": \"^1.0.2\",\n \"karma-sourcemap-loader\": \"^0.3.5\",\n \"mkdirp\": \"^0.5.1\",\n \"mocha\": \"^3.1.0\",\n \"phantomjs-prebuilt\": \"^2.0.0\",\n \"rollup\": \"^0.25.4\",\n \"rollup-plugin-json\": \"^2.0.0\",\n \"rollup-plugin-node-resolve\": \"^1.4.0\",\n \"rollup-plugin-uglify\": \"^0.3.1\",\n \"semistandard\": \"^10.0.0\",\n \"sinon\": \"^1.11.1\",\n \"sinon-chai\": \"2.8.0\",\n \"snazzy\": \"^5.0.0\",\n \"uglify-js\": \"^2.6.1\",\n \"watch\": \"^0.17.1\"\n },\n \"homepage\": \"http://esri.github.io/esri-leaflet\",\n \"jsnext:main\": \"src/EsriLeafletRenderers.js\",\n \"jspm\": {\n \"registry\": \"npm\",\n \"format\": \"es6\",\n \"main\": \"src/EsriLeafletRenderers.js\"\n },\n \"keywords\": [\n \"arcgis\",\n \"esri\",\n \"esri leaflet\",\n \"gis\",\n \"leaflet plugin\",\n \"mapping\",\n \"renderers\",\n \"symbology\"\n ],\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/esri-leaflet-renderers-debug.js\",\n \"module\": \"src/EsriLeafletRenderers.js\",\n \"browser\": \"dist/esri-leaflet-renderers-debug.js\",\n \"readmeFilename\": \"README.md\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git@github.com:Esri/esri-leaflet-renderers.git\"\n },\n \"scripts\": {\n \"prebuild\": \"mkdirp dist\",\n \"build\": \"rollup -c profiles/debug.js & rollup -c profiles/production.js\",\n \"lint\": \"semistandard src/**/*.js | snazzy\",\n \"prepublish\": \"npm run build\",\n \"pretest\": \"npm run build\",\n \"release\": \"./scripts/release.sh\",\n \"start\": \"watch 'npm run build' src & http-server -p 5000 -c-1 -o\",\n \"test\": \"npm run lint && karma start\"\n }\n}\n","import L from 'leaflet';\n\nexport var Symbol = L.Class.extend({\n initialize: function (symbolJson, options) {\n this._symbolJson = symbolJson;\n this.val = null;\n this._styles = {};\n this._isDefault = false;\n this._layerTransparency = 1;\n if (options && options.layerTransparency) {\n this._layerTransparency = 1 - (options.layerTransparency / 100.0);\n }\n },\n\n // the geojson values returned are in points\n pixelValue: function (pointValue) {\n return pointValue * 1.333;\n },\n\n // color is an array [r,g,b,a]\n colorValue: function (color) {\n return 'rgb(' + color[0] + ',' + color[1] + ',' + color[2] + ')';\n },\n\n alphaValue: function (color) {\n var alpha = color[3] / 255.0;\n return alpha * this._layerTransparency;\n },\n\n getSize: function (feature, sizeInfo) {\n var attr = feature.properties;\n var field = sizeInfo.field;\n var size = 0;\n var featureValue = null;\n\n if (field) {\n featureValue = attr[field];\n var minSize = sizeInfo.minSize;\n var maxSize = sizeInfo.maxSize;\n var minDataValue = sizeInfo.minDataValue;\n var maxDataValue = sizeInfo.maxDataValue;\n var featureRatio;\n var normField = sizeInfo.normalizationField;\n var normValue = attr ? parseFloat(attr[normField]) : undefined;\n\n if (featureValue === null || (normField && ((isNaN(normValue) || normValue === 0)))) {\n return null;\n }\n\n if (!isNaN(normValue)) {\n featureValue /= normValue;\n }\n\n if (minSize !== null && maxSize !== null && minDataValue !== null && maxDataValue !== null) {\n if (featureValue <= minDataValue) {\n size = minSize;\n } else if (featureValue >= maxDataValue) {\n size = maxSize;\n } else {\n featureRatio = (featureValue - minDataValue) / (maxDataValue - minDataValue);\n size = minSize + (featureRatio * (maxSize - minSize));\n }\n }\n size = isNaN(size) ? 0 : size;\n }\n return size;\n },\n\n getColor: function (feature, colorInfo) {\n // required information to get color\n if (!(feature.properties && colorInfo && colorInfo.field && colorInfo.stops)) {\n return null;\n }\n\n var attr = feature.properties;\n var featureValue = attr[colorInfo.field];\n var lowerBoundColor, upperBoundColor, lowerBound, upperBound;\n var normField = colorInfo.normalizationField;\n var normValue = attr ? parseFloat(attr[normField]) : undefined;\n if (featureValue === null || (normField && ((isNaN(normValue) || normValue === 0)))) {\n return null;\n }\n\n if (!isNaN(normValue)) {\n featureValue /= normValue;\n }\n\n if (featureValue <= colorInfo.stops[0].value) {\n return colorInfo.stops[0].color;\n }\n var lastStop = colorInfo.stops[colorInfo.stops.length - 1];\n if (featureValue >= lastStop.value) {\n return lastStop.color;\n }\n\n // go through the stops to find min and max\n for (var i = 0; i < colorInfo.stops.length; i++) {\n var stopInfo = colorInfo.stops[i];\n\n if (stopInfo.value <= featureValue) {\n lowerBoundColor = stopInfo.color;\n lowerBound = stopInfo.value;\n } else if (stopInfo.value > featureValue) {\n upperBoundColor = stopInfo.color;\n upperBound = stopInfo.value;\n break;\n }\n }\n\n // feature falls between two stops, interplate the colors\n if (!isNaN(lowerBound) && !isNaN(upperBound)) {\n var range = upperBound - lowerBound;\n if (range > 0) {\n // more weight the further it is from the lower bound\n var upperBoundColorWeight = (featureValue - lowerBound) / range;\n if (upperBoundColorWeight) {\n // more weight the further it is from the upper bound\n var lowerBoundColorWeight = (upperBound - featureValue) / range;\n if (lowerBoundColorWeight) {\n // interpolate the lower and upper bound color by applying the\n // weights to each of the rgba colors and adding them together\n var interpolatedColor = [];\n for (var j = 0; j < 4; j++) {\n interpolatedColor[j] = (Math.round(lowerBoundColor[j] * lowerBoundColorWeight) + (upperBoundColor[j] * upperBoundColorWeight));\n }\n return interpolatedColor;\n } else {\n // no difference between featureValue and upperBound, 100% of upperBoundColor\n return upperBoundColor;\n }\n } else {\n // no difference between featureValue and lowerBound, 100% of lowerBoundColor\n return lowerBoundColor;\n }\n }\n }\n // if we get to here, none of the cases apply so return null\n return null;\n }\n});\n\n// export function symbol (symbolJson) {\n// return new Symbol(symbolJson);\n// }\n\nexport default Symbol;\n","import L from 'leaflet';\n\nexport var ShapeMarker = L.Path.extend({\n\n initialize: function (latlng, size, options) {\n L.setOptions(this, options);\n this._size = size;\n this._latlng = L.latLng(latlng);\n this._svgCanvasIncludes();\n },\n\n toGeoJSON: function () {\n return L.GeoJSON.getFeature(this, {\n type: 'Point',\n coordinates: L.GeoJSON.latLngToCoords(this.getLatLng())\n });\n },\n\n _svgCanvasIncludes: function () {\n // implement in sub class\n },\n\n _project: function () {\n this._point = this._map.latLngToLayerPoint(this._latlng);\n },\n\n _update: function () {\n if (this._map) {\n this._updatePath();\n }\n },\n\n _updatePath: function () {\n // implement in sub class\n },\n\n setLatLng: function (latlng) {\n this._latlng = L.latLng(latlng);\n this.redraw();\n return this.fire('move', {latlng: this._latlng});\n },\n\n getLatLng: function () {\n return this._latlng;\n },\n\n setSize: function (size) {\n this._size = size;\n return this.redraw();\n },\n\n getSize: function () {\n return this._size;\n }\n});\n","import L from 'leaflet';\nimport { ShapeMarker } from './ShapeMarker';\n\nexport var CrossMarker = ShapeMarker.extend({\n\n initialize: function (latlng, size, options) {\n ShapeMarker.prototype.initialize.call(this, latlng, size, options);\n },\n\n _updatePath: function () {\n this._renderer._updateCrossMarker(this);\n },\n\n _svgCanvasIncludes: function () {\n L.Canvas.include({\n _updateCrossMarker: function (layer) {\n var latlng = layer._point;\n var offset = layer._size / 2.0;\n var ctx = this._ctx;\n\n ctx.beginPath();\n ctx.moveTo(latlng.x, latlng.y + offset);\n ctx.lineTo(latlng.x, latlng.y - offset);\n this._fillStroke(ctx, layer);\n\n ctx.moveTo(latlng.x - offset, latlng.y);\n ctx.lineTo(latlng.x + offset, latlng.y);\n this._fillStroke(ctx, layer);\n }\n });\n\n L.SVG.include({\n _updateCrossMarker: function (layer) {\n var latlng = layer._point;\n var offset = layer._size / 2.0;\n\n if (L.Browser.vml) {\n latlng._round();\n offset = Math.round(offset);\n }\n\n var str = 'M' + latlng.x + ',' + (latlng.y + offset) +\n 'L' + latlng.x + ',' + (latlng.y - offset) +\n 'M' + (latlng.x - offset) + ',' + latlng.y +\n 'L' + (latlng.x + offset) + ',' + latlng.y;\n\n this._setPath(layer, str);\n }\n });\n }\n});\n\nexport var crossMarker = function (latlng, size, options) {\n return new CrossMarker(latlng, size, options);\n};\n\nexport default crossMarker;\n","import L from 'leaflet';\nimport { ShapeMarker } from './ShapeMarker';\n\nexport var XMarker = ShapeMarker.extend({\n\n initialize: function (latlng, size, options) {\n ShapeMarker.prototype.initialize.call(this, latlng, size, options);\n },\n\n _updatePath: function () {\n this._renderer._updateXMarker(this);\n },\n\n _svgCanvasIncludes: function () {\n L.Canvas.include({\n _updateXMarker: function (layer) {\n var latlng = layer._point;\n var offset = layer._size / 2.0;\n var ctx = this._ctx;\n\n ctx.beginPath();\n\n ctx.moveTo(latlng.x + offset, latlng.y + offset);\n ctx.lineTo(latlng.x - offset, latlng.y - offset);\n this._fillStroke(ctx, layer);\n }\n });\n\n L.SVG.include({\n _updateXMarker: function (layer) {\n var latlng = layer._point;\n var offset = layer._size / 2.0;\n\n if (L.Browser.vml) {\n latlng._round();\n offset = Math.round(offset);\n }\n\n var str = 'M' + (latlng.x + offset) + ',' + (latlng.y + offset) +\n 'L' + (latlng.x - offset) + ',' + (latlng.y - offset) +\n 'M' + (latlng.x - offset) + ',' + (latlng.y + offset) +\n 'L' + (latlng.x + offset) + ',' + (latlng.y - offset);\n\n this._setPath(layer, str);\n }\n });\n }\n});\n\nexport var xMarker = function (latlng, size, options) {\n return new XMarker(latlng, size, options);\n};\n\nexport default xMarker;\n","import L from 'leaflet';\nimport { ShapeMarker } from './ShapeMarker';\n\nexport var SquareMarker = ShapeMarker.extend({\n options: {\n fill: true\n },\n\n initialize: function (latlng, size, options) {\n ShapeMarker.prototype.initialize.call(this, latlng, size, options);\n },\n\n _updatePath: function () {\n this._renderer._updateSquareMarker(this);\n },\n\n _svgCanvasIncludes: function () {\n L.Canvas.include({\n _updateSquareMarker: function (layer) {\n var latlng = layer._point;\n var offset = layer._size / 2.0;\n var ctx = this._ctx;\n\n ctx.beginPath();\n\n ctx.moveTo(latlng.x + offset, latlng.y + offset);\n ctx.lineTo(latlng.x - offset, latlng.y + offset);\n ctx.lineTo(latlng.x - offset, latlng.y - offset);\n ctx.lineTo(latlng.x + offset, latlng.y - offset);\n\n ctx.closePath();\n\n this._fillStroke(ctx, layer);\n }\n });\n\n L.SVG.include({\n _updateSquareMarker: function (layer) {\n var latlng = layer._point;\n var offset = layer._size / 2.0;\n\n if (L.Browser.vml) {\n latlng._round();\n offset = Math.round(offset);\n }\n\n var str = 'M' + (latlng.x + offset) + ',' + (latlng.y + offset) +\n 'L' + (latlng.x - offset) + ',' + (latlng.y + offset) +\n 'L' + (latlng.x - offset) + ',' + (latlng.y - offset) +\n 'L' + (latlng.x + offset) + ',' + (latlng.y - offset);\n\n str = str + (L.Browser.svg ? 'z' : 'x');\n\n this._setPath(layer, str);\n }\n });\n }\n});\n\nexport var squareMarker = function (latlng, size, options) {\n return new SquareMarker(latlng, size, options);\n};\n\nexport default squareMarker;\n","import L from 'leaflet';\nimport { ShapeMarker } from './ShapeMarker';\n\nexport var DiamondMarker = ShapeMarker.extend({\n options: {\n fill: true\n },\n\n initialize: function (latlng, size, options) {\n ShapeMarker.prototype.initialize.call(this, latlng, size, options);\n },\n\n _updatePath: function () {\n this._renderer._updateDiamondMarker(this);\n },\n\n _svgCanvasIncludes: function () {\n L.Canvas.include({\n _updateDiamondMarker: function (layer) {\n var latlng = layer._point;\n var offset = layer._size / 2.0;\n var ctx = this._ctx;\n\n ctx.beginPath();\n\n ctx.moveTo(latlng.x, latlng.y + offset);\n ctx.lineTo(latlng.x - offset, latlng.y);\n ctx.lineTo(latlng.x, latlng.y - offset);\n ctx.lineTo(latlng.x + offset, latlng.y);\n\n ctx.closePath();\n\n this._fillStroke(ctx, layer);\n }\n });\n\n L.SVG.include({\n _updateDiamondMarker: function (layer) {\n var latlng = layer._point;\n var offset = layer._size / 2.0;\n\n if (L.Browser.vml) {\n latlng._round();\n offset = Math.round(offset);\n }\n\n var str = 'M' + latlng.x + ',' + (latlng.y + offset) +\n 'L' + (latlng.x - offset) + ',' + latlng.y +\n 'L' + latlng.x + ',' + (latlng.y - offset) +\n 'L' + (latlng.x + offset) + ',' + latlng.y;\n\n str = str + (L.Browser.svg ? 'z' : 'x');\n\n this._setPath(layer, str);\n }\n });\n }\n});\n\nexport var diamondMarker = function (latlng, size, options) {\n return new DiamondMarker(latlng, size, options);\n};\n\nexport default diamondMarker;\n","import L from 'leaflet';\nimport Symbol from './Symbol';\nimport {squareMarker, xMarker, crossMarker, diamondMarker} from 'leaflet-shape-markers';\n\nexport var PointSymbol = Symbol.extend({\n\n statics: {\n MARKERTYPES: ['esriSMSCircle', 'esriSMSCross', 'esriSMSDiamond', 'esriSMSSquare', 'esriSMSX', 'esriPMS']\n },\n\n initialize: function (symbolJson, options) {\n var url;\n Symbol.prototype.initialize.call(this, symbolJson, options);\n if (options) {\n this.serviceUrl = options.url;\n }\n if (symbolJson) {\n if (symbolJson.type === 'esriPMS') {\n var imageUrl = this._symbolJson.url;\n if ((imageUrl && imageUrl.substr(0, 7) === 'http://') || (imageUrl.substr(0, 8) === 'https://')) {\n // web image\n url = this.sanitize(imageUrl);\n this._iconUrl = url;\n } else {\n url = this.serviceUrl + 'images/' + imageUrl;\n this._iconUrl = options && options.token ? url + '?token=' + options.token : url;\n }\n if (symbolJson.imageData) {\n this._iconUrl = 'data:' + symbolJson.contentType + ';base64,' + symbolJson.imageData;\n }\n // leaflet does not allow resizing icons so keep a hash of different\n // icon sizes to try and keep down on the number of icons created\n this._icons = {};\n // create base icon\n this.icon = this._createIcon(this._symbolJson);\n } else {\n this._fillStyles();\n }\n }\n },\n\n // prevent html injection in strings\n sanitize: function (str) {\n if (!str) {\n return '';\n }\n var text;\n try {\n // removes html but leaves url link text\n text = str.replace(/
/gi, '\\n');\n text = text.replace(//gi, '\\n');\n text = text.replace(/(.*?)<\\/a>/gi, ' $2 ($1) ');\n text = text.replace(/<(?:.|\\s)*?>/g, '');\n } catch (ex) {\n text = null;\n }\n return text;\n },\n\n _fillStyles: function () {\n if (this._symbolJson.outline && this._symbolJson.size > 0 && this._symbolJson.outline.style !== 'esriSLSNull') {\n this._styles.stroke = true;\n this._styles.weight = this.pixelValue(this._symbolJson.outline.width);\n this._styles.color = this.colorValue(this._symbolJson.outline.color);\n this._styles.opacity = this.alphaValue(this._symbolJson.outline.color);\n } else {\n this._styles.stroke = false;\n }\n if (this._symbolJson.color) {\n this._styles.fillColor = this.colorValue(this._symbolJson.color);\n this._styles.fillOpacity = this.alphaValue(this._symbolJson.color);\n } else {\n this._styles.fillOpacity = 0;\n }\n\n if (this._symbolJson.style === 'esriSMSCircle') {\n this._styles.radius = this.pixelValue(this._symbolJson.size) / 2.0;\n }\n },\n\n _createIcon: function (options) {\n var width = this.pixelValue(options.width);\n var height = width;\n if (options.height) {\n height = this.pixelValue(options.height);\n }\n var xOffset = width / 2.0;\n var yOffset = height / 2.0;\n\n if (options.xoffset) {\n xOffset += this.pixelValue(options.xoffset);\n }\n if (options.yoffset) {\n yOffset += this.pixelValue(options.yoffset);\n }\n\n var icon = L.icon({\n iconUrl: this._iconUrl,\n iconSize: [width, height],\n iconAnchor: [xOffset, yOffset]\n });\n this._icons[options.width.toString()] = icon;\n return icon;\n },\n\n _getIcon: function (size) {\n // check to see if it is already created by size\n var icon = this._icons[size.toString()];\n if (!icon) {\n icon = this._createIcon({width: size});\n }\n return icon;\n },\n\n pointToLayer: function (geojson, latlng, visualVariables, options) {\n var size = this._symbolJson.size || this._symbolJson.width;\n if (!this._isDefault) {\n if (visualVariables.sizeInfo) {\n var calculatedSize = this.getSize(geojson, visualVariables.sizeInfo);\n if (calculatedSize) {\n size = calculatedSize;\n }\n }\n if (visualVariables.colorInfo) {\n var color = this.getColor(geojson, visualVariables.colorInfo);\n if (color) {\n this._styles.fillColor = this.colorValue(color);\n this._styles.fillOpacity = this.alphaValue(color);\n }\n }\n }\n\n if (this._symbolJson.type === 'esriPMS') {\n var layerOptions = L.extend({}, {icon: this._getIcon(size)}, options);\n return L.marker(latlng, layerOptions);\n }\n size = this.pixelValue(size);\n\n switch (this._symbolJson.style) {\n case 'esriSMSSquare':\n return squareMarker(latlng, size, L.extend({}, this._styles, options));\n case 'esriSMSDiamond':\n return diamondMarker(latlng, size, L.extend({}, this._styles, options));\n case 'esriSMSCross':\n return crossMarker(latlng, size, L.extend({}, this._styles, options));\n case 'esriSMSX':\n return xMarker(latlng, size, L.extend({}, this._styles, options));\n }\n this._styles.radius = size / 2.0;\n return L.circleMarker(latlng, L.extend({}, this._styles, options));\n }\n});\n\nexport function pointSymbol (symbolJson, options) {\n return new PointSymbol(symbolJson, options);\n}\n\nexport default pointSymbol;\n","import Symbol from './Symbol';\n\nexport var LineSymbol = Symbol.extend({\n statics: {\n // Not implemented 'esriSLSNull'\n LINETYPES: ['esriSLSDash', 'esriSLSDot', 'esriSLSDashDotDot', 'esriSLSDashDot', 'esriSLSSolid']\n },\n initialize: function (symbolJson, options) {\n Symbol.prototype.initialize.call(this, symbolJson, options);\n this._fillStyles();\n },\n\n _fillStyles: function () {\n // set the defaults that show up on arcgis online\n this._styles.lineCap = 'butt';\n this._styles.lineJoin = 'miter';\n this._styles.fill = false;\n this._styles.weight = 0;\n\n if (!this._symbolJson) {\n return this._styles;\n }\n\n if (this._symbolJson.color) {\n this._styles.color = this.colorValue(this._symbolJson.color);\n this._styles.opacity = this.alphaValue(this._symbolJson.color);\n }\n\n if (!isNaN(this._symbolJson.width)) {\n this._styles.weight = this.pixelValue(this._symbolJson.width);\n\n var dashValues = [];\n\n switch (this._symbolJson.style) {\n case 'esriSLSDash':\n dashValues = [4, 3];\n break;\n case 'esriSLSDot':\n dashValues = [1, 3];\n break;\n case 'esriSLSDashDot':\n dashValues = [8, 3, 1, 3];\n break;\n case 'esriSLSDashDotDot':\n dashValues = [8, 3, 1, 3, 1, 3];\n break;\n }\n\n // use the dash values and the line weight to set dash array\n if (dashValues.length > 0) {\n for (var i = 0; i < dashValues.length; i++) {\n dashValues[i] *= this._styles.weight;\n }\n\n this._styles.dashArray = dashValues.join(',');\n }\n }\n },\n\n style: function (feature, visualVariables) {\n if (!this._isDefault && visualVariables) {\n if (visualVariables.sizeInfo) {\n var calculatedSize = this.pixelValue(this.getSize(feature, visualVariables.sizeInfo));\n if (calculatedSize) {\n this._styles.weight = calculatedSize;\n }\n }\n if (visualVariables.colorInfo) {\n var color = this.getColor(feature, visualVariables.colorInfo);\n if (color) {\n this._styles.color = this.colorValue(color);\n this._styles.opacity = this.alphaValue(color);\n }\n }\n }\n return this._styles;\n }\n});\n\nexport function lineSymbol (symbolJson, options) {\n return new LineSymbol(symbolJson, options);\n}\n\nexport default lineSymbol;\n","import Symbol from './Symbol';\nimport lineSymbol from './LineSymbol';\n\nexport var PolygonSymbol = Symbol.extend({\n statics: {\n // not implemented: 'esriSFSBackwardDiagonal','esriSFSCross','esriSFSDiagonalCross','esriSFSForwardDiagonal','esriSFSHorizontal','esriSFSNull','esriSFSVertical'\n POLYGONTYPES: ['esriSFSSolid']\n },\n initialize: function (symbolJson, options) {\n Symbol.prototype.initialize.call(this, symbolJson, options);\n if (symbolJson) {\n if (symbolJson.outline && symbolJson.outline.style === 'esriSLSNull') {\n this._lineStyles = { weight: 0 };\n } else {\n this._lineStyles = lineSymbol(symbolJson.outline, options).style();\n }\n this._fillStyles();\n }\n },\n\n _fillStyles: function () {\n if (this._lineStyles) {\n if (this._lineStyles.weight === 0) {\n // when weight is 0, setting the stroke to false can still look bad\n // (gaps between the polygons)\n this._styles.stroke = false;\n } else {\n // copy the line symbol styles into this symbol's styles\n for (var styleAttr in this._lineStyles) {\n this._styles[styleAttr] = this._lineStyles[styleAttr];\n }\n }\n }\n\n // set the fill for the polygon\n if (this._symbolJson) {\n if (this._symbolJson.color &&\n // don't fill polygon if type is not supported\n PolygonSymbol.POLYGONTYPES.indexOf(this._symbolJson.style >= 0)) {\n this._styles.fill = true;\n this._styles.fillColor = this.colorValue(this._symbolJson.color);\n this._styles.fillOpacity = this.alphaValue(this._symbolJson.color);\n } else {\n this._styles.fill = false;\n this._styles.fillOpacity = 0;\n }\n }\n },\n\n style: function (feature, visualVariables) {\n if (!this._isDefault && visualVariables && visualVariables.colorInfo) {\n var color = this.getColor(feature, visualVariables.colorInfo);\n if (color) {\n this._styles.fillColor = this.colorValue(color);\n this._styles.fillOpacity = this.alphaValue(color);\n }\n }\n return this._styles;\n }\n});\n\nexport function polygonSymbol (symbolJson, options) {\n return new PolygonSymbol(symbolJson, options);\n}\n\nexport default polygonSymbol;\n","import L from 'leaflet';\n\nimport pointSymbol from '../Symbols/PointSymbol';\nimport lineSymbol from '../Symbols/LineSymbol';\nimport polygonSymbol from '../Symbols/PolygonSymbol';\n\nexport var Renderer = L.Class.extend({\n options: {\n proportionalPolygon: false,\n clickable: true\n },\n\n initialize: function (rendererJson, options) {\n this._rendererJson = rendererJson;\n this._pointSymbols = false;\n this._symbols = [];\n this._visualVariables = this._parseVisualVariables(rendererJson.visualVariables);\n L.Util.setOptions(this, options);\n },\n\n _parseVisualVariables: function (visualVariables) {\n var visVars = {};\n if (visualVariables) {\n for (var i = 0; i < visualVariables.length; i++) {\n visVars[visualVariables[i].type] = visualVariables[i];\n }\n }\n return visVars;\n },\n\n _createDefaultSymbol: function () {\n if (this._rendererJson.defaultSymbol) {\n this._defaultSymbol = this._newSymbol(this._rendererJson.defaultSymbol);\n this._defaultSymbol._isDefault = true;\n }\n },\n\n _newSymbol: function (symbolJson) {\n if (symbolJson.type === 'esriSMS' || symbolJson.type === 'esriPMS') {\n this._pointSymbols = true;\n return pointSymbol(symbolJson, this.options);\n }\n if (symbolJson.type === 'esriSLS') {\n return lineSymbol(symbolJson, this.options);\n }\n if (symbolJson.type === 'esriSFS') {\n return polygonSymbol(symbolJson, this.options);\n }\n },\n\n _getSymbol: function () {\n // override\n },\n\n attachStylesToLayer: function (layer) {\n if (this._pointSymbols) {\n layer.options.pointToLayer = L.Util.bind(this.pointToLayer, this);\n } else {\n layer.options.style = L.Util.bind(this.style, this);\n layer._originalStyle = layer.options.style;\n }\n },\n\n pointToLayer: function (geojson, latlng) {\n var sym = this._getSymbol(geojson);\n if (sym && sym.pointToLayer) {\n // right now custom panes are the only option pushed through\n return sym.pointToLayer(geojson, latlng, this._visualVariables, this.options);\n }\n // invisible symbology\n return L.circleMarker(latlng, {radius: 0, opacity: 0});\n },\n\n style: function (feature) {\n var userStyles;\n if (this.options.userDefinedStyle) {\n userStyles = this.options.userDefinedStyle(feature);\n }\n // find the symbol to represent this feature\n var sym = this._getSymbol(feature);\n if (sym) {\n return this.mergeStyles(sym.style(feature, this._visualVariables), userStyles);\n } else {\n // invisible symbology\n return this.mergeStyles({opacity: 0, fillOpacity: 0}, userStyles);\n }\n },\n\n mergeStyles: function (styles, userStyles) {\n var mergedStyles = {};\n var attr;\n // copy renderer style attributes\n for (attr in styles) {\n if (styles.hasOwnProperty(attr)) {\n mergedStyles[attr] = styles[attr];\n }\n }\n // override with user defined style attributes\n if (userStyles) {\n for (attr in userStyles) {\n if (userStyles.hasOwnProperty(attr)) {\n mergedStyles[attr] = userStyles[attr];\n }\n }\n }\n return mergedStyles;\n }\n});\n\nexport default Renderer;\n","import Renderer from './Renderer';\n\nexport var SimpleRenderer = Renderer.extend({\n initialize: function (rendererJson, options) {\n Renderer.prototype.initialize.call(this, rendererJson, options);\n this._createSymbol();\n },\n\n _createSymbol: function () {\n if (this._rendererJson.symbol) {\n this._symbols.push(this._newSymbol(this._rendererJson.symbol));\n }\n },\n\n _getSymbol: function () {\n return this._symbols[0];\n }\n});\n\nexport function simpleRenderer (rendererJson, options) {\n return new SimpleRenderer(rendererJson, options);\n}\n\nexport default simpleRenderer;\n","import Renderer from './Renderer';\n\nexport var ClassBreaksRenderer = Renderer.extend({\n initialize: function (rendererJson, options) {\n Renderer.prototype.initialize.call(this, rendererJson, options);\n this._field = this._rendererJson.field;\n if (this._rendererJson.normalizationType && this._rendererJson.normalizationType === 'esriNormalizeByField') {\n this._normalizationField = this._rendererJson.normalizationField;\n }\n this._createSymbols();\n },\n\n _createSymbols: function () {\n var symbol;\n var classbreaks = this._rendererJson.classBreakInfos;\n\n this._symbols = [];\n\n // create a symbol for each class break\n for (var i = classbreaks.length - 1; i >= 0; i--) {\n if (this.options.proportionalPolygon && this._rendererJson.backgroundFillSymbol) {\n symbol = this._newSymbol(this._rendererJson.backgroundFillSymbol);\n } else {\n symbol = this._newSymbol(classbreaks[i].symbol);\n }\n symbol.val = classbreaks[i].classMaxValue;\n this._symbols.push(symbol);\n }\n // sort the symbols in ascending value\n this._symbols.sort(function (a, b) {\n return a.val > b.val ? 1 : -1;\n });\n this._createDefaultSymbol();\n this._maxValue = this._symbols[this._symbols.length - 1].val;\n },\n\n _getSymbol: function (feature) {\n var val = feature.properties[this._field];\n if (this._normalizationField) {\n var normValue = feature.properties[this._normalizationField];\n if (!isNaN(normValue) && normValue !== 0) {\n val = val / normValue;\n } else {\n return this._defaultSymbol;\n }\n }\n\n if (val > this._maxValue) {\n return this._defaultSymbol;\n }\n var symbol = this._symbols[0];\n for (var i = this._symbols.length - 1; i >= 0; i--) {\n if (val > this._symbols[i].val) {\n break;\n }\n symbol = this._symbols[i];\n }\n return symbol;\n }\n});\n\nexport function classBreaksRenderer (rendererJson, options) {\n return new ClassBreaksRenderer(rendererJson, options);\n}\n\nexport default classBreaksRenderer;\n","import Renderer from './Renderer';\n\nexport var UniqueValueRenderer = Renderer.extend({\n initialize: function (rendererJson, options) {\n Renderer.prototype.initialize.call(this, rendererJson, options);\n this._field = this._rendererJson.field1;\n this._createSymbols();\n },\n\n _createSymbols: function () {\n var symbol;\n var uniques = this._rendererJson.uniqueValueInfos;\n\n // create a symbol for each unique value\n for (var i = uniques.length - 1; i >= 0; i--) {\n symbol = this._newSymbol(uniques[i].symbol);\n symbol.val = uniques[i].value;\n this._symbols.push(symbol);\n }\n this._createDefaultSymbol();\n },\n\n _getSymbol: function (feature) {\n var val = feature.properties[this._field];\n // accumulate values if there is more than one field defined\n if (this._rendererJson.fieldDelimiter && this._rendererJson.field2) {\n var val2 = feature.properties[this._rendererJson.field2];\n if (val2) {\n val += this._rendererJson.fieldDelimiter + val2;\n var val3 = feature.properties[this._rendererJson.field3];\n if (val3) {\n val += this._rendererJson.fieldDelimiter + val3;\n }\n }\n }\n\n var symbol = this._defaultSymbol;\n for (var i = this._symbols.length - 1; i >= 0; i--) {\n // using the === operator does not work if the field\n // of the unique renderer is not a string\n /*eslint-disable */\n if (this._symbols[i].val == val) {\n symbol = this._symbols[i];\n }\n /*eslint-enable */\n }\n return symbol;\n }\n});\n\nexport function uniqueValueRenderer (rendererJson, options) {\n return new UniqueValueRenderer(rendererJson, options);\n}\n\nexport default uniqueValueRenderer;\n","import L from 'leaflet';\nimport Esri from 'esri-leaflet';\nimport classBreaksRenderer from './Renderers/ClassBreaksRenderer';\nimport uniqueValueRenderer from './Renderers/UniqueValueRenderer';\nimport simpleRenderer from './Renderers/SimpleRenderer';\n\nEsri.FeatureLayer.addInitHook(function () {\n if (this.options.ignoreRenderer) {\n return;\n }\n var oldOnAdd = L.Util.bind(this.onAdd, this);\n var oldUnbindPopup = L.Util.bind(this.unbindPopup, this);\n var oldOnRemove = L.Util.bind(this.onRemove, this);\n L.Util.bind(this.createNewLayer, this);\n\n this.onAdd = function (map) {\n this.metadata(function (error, response) {\n if (error) {\n console.warn('failed to load metadata from the service.');\n return;\n } if (response && response.drawingInfo) {\n if (this.options.drawingInfo) {\n // allow L.esri.webmap (and others) to override service symbology with info provided in layer constructor\n response.drawingInfo = this.options.drawingInfo;\n }\n\n // the default pane for lines and polygons is 'overlayPane', for points it is 'markerPane'\n if (this.options.pane === 'overlayPane' && response.geometryType === 'esriGeometryPoint') {\n this.options.pane = 'markerPane';\n }\n\n this._setRenderers(response);\n oldOnAdd(map);\n this._addPointLayer(map);\n }\n }, this);\n };\n\n this.onRemove = function (map) {\n oldOnRemove(map);\n if (this._pointLayer) {\n var pointLayers = this._pointLayer.getLayers();\n for (var i in pointLayers) {\n map.removeLayer(pointLayers[i]);\n }\n }\n };\n\n this.unbindPopup = function () {\n oldUnbindPopup();\n if (this._pointLayer) {\n var pointLayers = this._pointLayer.getLayers();\n for (var i in pointLayers) {\n pointLayers[i].unbindPopup();\n }\n }\n };\n\n this._addPointLayer = function (map) {\n if (this._pointLayer) {\n this._pointLayer.addTo(map);\n this._pointLayer.bringToFront();\n }\n };\n\n this._createPointLayer = function () {\n if (!this._pointLayer) {\n this._pointLayer = L.geoJson();\n // store the feature ids that have already been added to the map\n this._pointLayerIds = {};\n\n if (this._popup) {\n var popupFunction = function (feature, layer) {\n layer.bindPopup(this._popup(feature, layer), this._popupOptions);\n };\n this._pointLayer.options.onEachFeature = L.Util.bind(popupFunction, this);\n }\n }\n };\n\n this.createNewLayer = function (geojson) {\n var fLayer = L.GeoJSON.geometryToLayer(geojson, this.options);\n\n // add a point layer when the polygon is represented as proportional marker symbols\n if (this._hasProportionalSymbols) {\n var centroid = this.getPolygonCentroid(geojson.geometry.coordinates);\n if (!(isNaN(centroid[0]) || isNaN(centroid[0]))) {\n this._createPointLayer();\n\n var featureId = geojson.id.toString();\n // only add the feature if it does not already exist on the map\n if (!this._pointLayerIds[featureId]) {\n var pointjson = this.getPointJson(geojson, centroid);\n\n this._pointLayer.addData(pointjson);\n this._pointLayerIds[featureId] = true;\n }\n\n this._pointLayer.bringToFront();\n }\n }\n return fLayer;\n };\n\n this.getPolygonCentroid = function (coordinates) {\n var pts = coordinates[0][0];\n if (pts.length === 2) {\n pts = coordinates[0];\n }\n\n var twicearea = 0;\n var x = 0;\n var y = 0;\n var nPts = pts.length;\n var p1;\n var p2;\n var f;\n\n for (var i = 0, j = nPts - 1; i < nPts; j = i++) {\n p1 = pts[i]; p2 = pts[j];\n twicearea += p1[0] * p2[1];\n twicearea -= p1[1] * p2[0];\n f = p1[0] * p2[1] - p2[0] * p1[1];\n x += (p1[0] + p2[0]) * f;\n y += (p1[1] + p2[1]) * f;\n }\n f = twicearea * 3;\n return [x / f, y / f];\n };\n\n this.getPointJson = function (geojson, centroid) {\n return {\n type: 'Feature',\n properties: geojson.properties,\n id: geojson.id,\n geometry: {\n type: 'Point',\n coordinates: [centroid[0], centroid[1]]\n }\n };\n };\n\n this._checkForProportionalSymbols = function (geometryType, renderer) {\n this._hasProportionalSymbols = false;\n if (geometryType === 'esriGeometryPolygon') {\n if (renderer.backgroundFillSymbol) {\n this._hasProportionalSymbols = true;\n }\n // check to see if the first symbol in the classbreaks is a marker symbol\n if (renderer.classBreakInfos && renderer.classBreakInfos.length) {\n var sym = renderer.classBreakInfos[0].symbol;\n if (sym && (sym.type === 'esriSMS' || sym.type === 'esriPMS')) {\n this._hasProportionalSymbols = true;\n }\n }\n }\n };\n\n this._setRenderers = function (serviceInfo) {\n var rend;\n var rendererInfo = serviceInfo.drawingInfo.renderer;\n\n var options = {\n url: this.options.url\n };\n\n if (this.options.token) {\n options.token = this.options.token;\n }\n\n if (this.options.pane) {\n options.pane = this.options.pane;\n }\n\n if (serviceInfo.drawingInfo.transparency) {\n options.layerTransparency = serviceInfo.drawingInfo.transparency;\n }\n\n if (this.options.style) {\n options.userDefinedStyle = this.options.style;\n }\n\n switch (rendererInfo.type) {\n case 'classBreaks':\n this._checkForProportionalSymbols(serviceInfo.geometryType, rendererInfo);\n if (this._hasProportionalSymbols) {\n this._createPointLayer();\n var pRend = classBreaksRenderer(rendererInfo, options);\n pRend.attachStylesToLayer(this._pointLayer);\n options.proportionalPolygon = true;\n }\n rend = classBreaksRenderer(rendererInfo, options);\n break;\n case 'uniqueValue':\n rend = uniqueValueRenderer(rendererInfo, options);\n break;\n default:\n rend = simpleRenderer(rendererInfo, options);\n }\n rend.attachStylesToLayer(this);\n };\n});\n"],"names":["pointSymbol","symbolJson","options","PointSymbol","lineSymbol","LineSymbol","polygonSymbol","PolygonSymbol","simpleRenderer","rendererJson","SimpleRenderer","classBreaksRenderer","ClassBreaksRenderer","uniqueValueRenderer","UniqueValueRenderer","Symbol","L","Class","extend","initialize","this","_symbolJson","val","_styles","_isDefault","_layerTransparency","layerTransparency","pixelValue","pointValue","colorValue","color","alphaValue","getSize","feature","sizeInfo","attr","properties","field","size","featureValue","featureRatio","minSize","maxSize","minDataValue","maxDataValue","normField","normalizationField","normValue","parseFloat","undefined","isNaN","getColor","colorInfo","stops","lowerBoundColor","upperBoundColor","lowerBound","upperBound","value","lastStop","length","i","stopInfo","range","upperBoundColorWeight","lowerBoundColorWeight","interpolatedColor","j","Math","round","ShapeMarker","Path","latlng","setOptions","_size","_latlng","latLng","_svgCanvasIncludes","toGeoJSON","GeoJSON","getFeature","type","coordinates","latLngToCoords","getLatLng","_project","_point","_map","latLngToLayerPoint","_update","_updatePath","setLatLng","redraw","fire","setSize","CrossMarker","prototype","call","_renderer","_updateCrossMarker","Canvas","include","layer","offset","ctx","_ctx","beginPath","moveTo","x","y","lineTo","_fillStroke","SVG","Browser","vml","_round","str","_setPath","crossMarker","XMarker","_updateXMarker","xMarker","SquareMarker","fill","_updateSquareMarker","closePath","svg","squareMarker","DiamondMarker","_updateDiamondMarker","diamondMarker","statics","MARKERTYPES","url","serviceUrl","imageUrl","substr","sanitize","_iconUrl","token","imageData","contentType","_icons","icon","_createIcon","_fillStyles","text","replace","ex","outline","style","stroke","weight","width","opacity","fillColor","fillOpacity","radius","height","xOffset","yOffset","xoffset","yoffset","iconUrl","iconSize","iconAnchor","toString","_getIcon","pointToLayer","geojson","visualVariables","calculatedSize","layerOptions","marker","circleMarker","LINETYPES","lineCap","lineJoin","dashValues","dashArray","join","POLYGONTYPES","_lineStyles","styleAttr","indexOf","Renderer","proportionalPolygon","clickable","_rendererJson","_pointSymbols","_symbols","_visualVariables","_parseVisualVariables","Util","visVars","_createDefaultSymbol","defaultSymbol","_defaultSymbol","_newSymbol","_getSymbol","attachStylesToLayer","bind","_originalStyle","sym","userStyles","userDefinedStyle","mergeStyles","styles","mergedStyles","hasOwnProperty","_createSymbol","symbol","push","_field","normalizationType","_normalizationField","_createSymbols","classbreaks","classBreakInfos","backgroundFillSymbol","classMaxValue","sort","a","b","_maxValue","field1","uniques","uniqueValueInfos","fieldDelimiter","field2","val2","val3","field3","Esri","FeatureLayer","addInitHook","ignoreRenderer","oldOnAdd","onAdd","oldUnbindPopup","unbindPopup","oldOnRemove","onRemove","createNewLayer","map","metadata","error","response","console","warn","drawingInfo","pane","geometryType","_setRenderers","_addPointLayer","_pointLayer","pointLayers","getLayers","removeLayer","addTo","bringToFront","_createPointLayer","geoJson","_pointLayerIds","_popup","popupFunction","bindPopup","_popupOptions","onEachFeature","fLayer","geometryToLayer","_hasProportionalSymbols","centroid","getPolygonCentroid","geometry","featureId","id","pointjson","getPointJson","addData","pts","p1","p2","f","twicearea","nPts","_checkForProportionalSymbols","renderer","serviceInfo","rend","rendererInfo","transparency"],"mappings":";;;+UOyJO,SAASA,GAAaC,EAAYC,GACvC,MAAO,IAAIC,GAAYF,EAAYC,GC3E9B,QAASE,GAAYH,EAAYC,GACtC,MAAO,IAAIG,GAAWJ,EAAYC,GCnB7B,QAASI,GAAeL,EAAYC,GACzC,MAAO,IAAIK,GAAcN,EAAYC,GE3ChC,QAASM,GAAgBC,EAAcP,GAC5C,MAAO,IAAIQ,GAAeD,EAAcP,GCyCnC,QAASS,GAAqBF,EAAcP,GACjD,MAAO,IAAIU,GAAoBH,EAAcP,GCZxC,QAASW,GAAqBJ,EAAcP,GACjD,MAAO,IAAIY,GAAoBL,EAAcP,8DZjDpCa,GAASC,EAAEC,MAAMC,QAC1BC,WAAY,SAAUlB,EAAYC,GAChCkB,KAAKC,YAAcpB,EACnBmB,KAAKE,IAAM,KACXF,KAAKG,WACLH,KAAKI,YAAa,EAClBJ,KAAKK,mBAAqB,EACtBvB,GAAWA,EAAQwB,oBACrBN,KAAKK,mBAAqB,EAAKvB,EAAQwB,kBAAoB,MAK/DC,WAAY,SAAUC,GACpB,MAAoB,OAAbA,GAITC,WAAY,SAAUC,GACpB,MAAO,OAASA,EAAM,GAAK,IAAMA,EAAM,GAAK,IAAMA,EAAM,GAAK,KAG/DC,WAAY,SAAUD,GAEpB,MADYA,GAAM,GAAK,IACRV,KAAKK,oBAGtBO,QAAS,SAAUC,EAASC,GAC1B,GAAIC,GAAOF,EAAQG,WACfC,EAAQH,EAASG,MACjBC,EAAO,EACPC,EAAe,IAEnB,IAAIF,EAAO,CACTE,EAAeJ,EAAKE,EACpB,IAIIG,GAJAC,EAAUP,EAASO,QACnBC,EAAUR,EAASQ,QACnBC,EAAeT,EAASS,aACxBC,EAAeV,EAASU,aAExBC,EAAYX,EAASY,mBACrBC,EAAYZ,EAAOa,WAAWb,EAAKU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