diff --git a/dist/esri-leaflet-renderers-debug.js b/dist/esri-leaflet-renderers-debug.js
new file mode 100644
index 0000000..0f2c59f
--- /dev/null
+++ b/dist/esri-leaflet-renderers-debug.js
@@ -0,0 +1,1188 @@
+/* esri-leaflet-renderers - v2.1.1 - Tue Jun 23 2020 10:29:23 GMT-0500 (Central Daylight Time)
+ * Copyright (c) 2020 Environmental Systems Research Institute, Inc.
+ * Apache-2.0 */
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('leaflet'), require('esri-leaflet'), require('esri-leaflet-cluster')) :
+ typeof define === 'function' && define.amd ? define(['exports', 'leaflet', 'esri-leaflet', 'esri-leaflet-cluster'], factory) :
+ (global = global || self, factory((global.L = global.L || {}, global.L.esri = global.L.esri || {}, global.L.esri.Renderers = {}), global.L, global.L.esri, global.L.esri.Cluster));
+}(this, (function (exports, L, EsriLeaflet, EsriLeafletCluster) { 'use strict';
+
+ var L__default = 'default' in L ? L['default'] : L;
+
+ var version = "2.1.1";
+
+ 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__default.Path.extend({
+
+ initialize: function (latlng, size, options) {
+ L__default.setOptions(this, options);
+ this._size = size;
+ this._latlng = L__default.latLng(latlng);
+ this._svgCanvasIncludes();
+ },
+
+ toGeoJSON: function () {
+ return L__default.GeoJSON.getFeature(this, {
+ type: 'Point',
+ coordinates: L__default.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__default.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__default.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__default.SVG.include({
+ _updateCrossMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+
+ if (L__default.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__default.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__default.SVG.include({
+ _updateXMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+
+ if (L__default.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__default.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__default.SVG.include({
+ _updateSquareMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+
+ if (L__default.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__default.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__default.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__default.SVG.include({
+ _updateDiamondMarker: function (layer) {
+ var latlng = layer._point;
+ var offset = layer._size / 2.0;
+
+ if (L__default.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__default.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);
+ }
+
+ function wireUpRenderers () {
+ 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);
+ };
+ }
+
+ EsriLeaflet.FeatureLayer.addInitHook(wireUpRenderers);
+
+ if (typeof EsriLeafletCluster !== 'undefined') {
+ EsriLeafletCluster.FeatureLayer.addInitHook(wireUpRenderers);
+ }
+
+ exports.ClassBreaksRenderer = ClassBreaksRenderer;
+ exports.LineSymbol = LineSymbol;
+ exports.PointSymbol = PointSymbol;
+ exports.PolygonSymbol = PolygonSymbol;
+ exports.Renderer = Renderer;
+ exports.SimpleRenderer = SimpleRenderer;
+ exports.Symbol = Symbol;
+ exports.UniqueValueRenderer = UniqueValueRenderer;
+ exports.VERSION = version;
+ exports.classBreaksRenderer = classBreaksRenderer;
+ exports.lineSymbol = lineSymbol;
+ exports.pointSymbol = pointSymbol;
+ exports.polygonSymbol = polygonSymbol;
+ exports.simpleRenderer = simpleRenderer;
+ exports.uniqueValueRenderer = uniqueValueRenderer;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+//# sourceMappingURL=esri-leaflet-renderers-debug.js.map
diff --git a/dist/esri-leaflet-renderers-debug.js.map b/dist/esri-leaflet-renderers-debug.js.map
new file mode 100644
index 0000000..3e6371d
--- /dev/null
+++ b/dist/esri-leaflet-renderers-debug.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"esri-leaflet-renderers-debug.js","sources":["../src/Symbols/Symbol.js","../node_modules/leaflet-shape-markers/src/ShapeMarker.js","../node_modules/leaflet-shape-markers/src/CrossMarker.js","../node_modules/leaflet-shape-markers/src/XMarker.js","../node_modules/leaflet-shape-markers/src/SquareMarker.js","../node_modules/leaflet-shape-markers/src/DiamondMarker.js","../src/Symbols/PointSymbol.js","../src/Symbols/LineSymbol.js","../src/Symbols/PolygonSymbol.js","../src/Renderers/Renderer.js","../src/Renderers/SimpleRenderer.js","../src/Renderers/ClassBreaksRenderer.js","../src/Renderers/UniqueValueRenderer.js","../src/FeatureLayerHook.js"],"sourcesContent":["import { Class } from 'leaflet';\r\n\r\nexport var Symbol = Class.extend({\r\n initialize: function (symbolJson, options) {\r\n this._symbolJson = symbolJson;\r\n this.val = null;\r\n this._styles = {};\r\n this._isDefault = false;\r\n this._layerTransparency = 1;\r\n if (options && options.layerTransparency) {\r\n this._layerTransparency = 1 - (options.layerTransparency / 100.0);\r\n }\r\n },\r\n\r\n // the geojson values returned are in points\r\n pixelValue: function (pointValue) {\r\n return pointValue * 1.333;\r\n },\r\n\r\n // color is an array [r,g,b,a]\r\n colorValue: function (color) {\r\n return 'rgb(' + color[0] + ',' + color[1] + ',' + color[2] + ')';\r\n },\r\n\r\n alphaValue: function (color) {\r\n var alpha = color[3] / 255.0;\r\n return alpha * this._layerTransparency;\r\n },\r\n\r\n getSize: function (feature, sizeInfo) {\r\n var attr = feature.properties;\r\n var field = sizeInfo.field;\r\n var size = 0;\r\n var featureValue = null;\r\n\r\n if (field) {\r\n featureValue = attr[field];\r\n var minSize = sizeInfo.minSize;\r\n var maxSize = sizeInfo.maxSize;\r\n var minDataValue = sizeInfo.minDataValue;\r\n var maxDataValue = sizeInfo.maxDataValue;\r\n var featureRatio;\r\n var normField = sizeInfo.normalizationField;\r\n var normValue = attr ? parseFloat(attr[normField]) : undefined;\r\n\r\n if (featureValue === null || (normField && ((isNaN(normValue) || normValue === 0)))) {\r\n return null;\r\n }\r\n\r\n if (!isNaN(normValue)) {\r\n featureValue /= normValue;\r\n }\r\n\r\n if (minSize !== null && maxSize !== null && minDataValue !== null && maxDataValue !== null) {\r\n if (featureValue <= minDataValue) {\r\n size = minSize;\r\n } else if (featureValue >= maxDataValue) {\r\n size = maxSize;\r\n } else {\r\n featureRatio = (featureValue - minDataValue) / (maxDataValue - minDataValue);\r\n size = minSize + (featureRatio * (maxSize - minSize));\r\n }\r\n }\r\n size = isNaN(size) ? 0 : size;\r\n }\r\n return size;\r\n },\r\n\r\n getColor: function (feature, colorInfo) {\r\n // required information to get color\r\n if (!(feature.properties && colorInfo && colorInfo.field && colorInfo.stops)) {\r\n return null;\r\n }\r\n\r\n var attr = feature.properties;\r\n var featureValue = attr[colorInfo.field];\r\n var lowerBoundColor, upperBoundColor, lowerBound, upperBound;\r\n var normField = colorInfo.normalizationField;\r\n var normValue = attr ? parseFloat(attr[normField]) : undefined;\r\n if (featureValue === null || (normField && ((isNaN(normValue) || normValue === 0)))) {\r\n return null;\r\n }\r\n\r\n if (!isNaN(normValue)) {\r\n featureValue /= normValue;\r\n }\r\n\r\n if (featureValue <= colorInfo.stops[0].value) {\r\n return colorInfo.stops[0].color;\r\n }\r\n var lastStop = colorInfo.stops[colorInfo.stops.length - 1];\r\n if (featureValue >= lastStop.value) {\r\n return lastStop.color;\r\n }\r\n\r\n // go through the stops to find min and max\r\n for (var i = 0; i < colorInfo.stops.length; i++) {\r\n var stopInfo = colorInfo.stops[i];\r\n\r\n if (stopInfo.value <= featureValue) {\r\n lowerBoundColor = stopInfo.color;\r\n lowerBound = stopInfo.value;\r\n } else if (stopInfo.value > featureValue) {\r\n upperBoundColor = stopInfo.color;\r\n upperBound = stopInfo.value;\r\n break;\r\n }\r\n }\r\n\r\n // feature falls between two stops, interplate the colors\r\n if (!isNaN(lowerBound) && !isNaN(upperBound)) {\r\n var range = upperBound - lowerBound;\r\n if (range > 0) {\r\n // more weight the further it is from the lower bound\r\n var upperBoundColorWeight = (featureValue - lowerBound) / range;\r\n if (upperBoundColorWeight) {\r\n // more weight the further it is from the upper bound\r\n var lowerBoundColorWeight = (upperBound - featureValue) / range;\r\n if (lowerBoundColorWeight) {\r\n // interpolate the lower and upper bound color by applying the\r\n // weights to each of the rgba colors and adding them together\r\n var interpolatedColor = [];\r\n for (var j = 0; j < 4; j++) {\r\n interpolatedColor[j] = Math.round((lowerBoundColor[j] * lowerBoundColorWeight) + (upperBoundColor[j] * upperBoundColorWeight));\r\n }\r\n return interpolatedColor;\r\n } else {\r\n // no difference between featureValue and upperBound, 100% of upperBoundColor\r\n return upperBoundColor;\r\n }\r\n } else {\r\n // no difference between featureValue and lowerBound, 100% of lowerBoundColor\r\n return lowerBoundColor;\r\n }\r\n }\r\n }\r\n // if we get to here, none of the cases apply so return null\r\n return null;\r\n }\r\n});\r\n\r\n// export function symbol (symbolJson) {\r\n// return new Symbol(symbolJson);\r\n// }\r\n\r\nexport default Symbol;\r\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 {\r\n marker,\r\n icon as leafletIcon,\r\n extend,\r\n circleMarker\r\n} from 'leaflet';\r\nimport Symbol from './Symbol';\r\nimport { squareMarker, xMarker, crossMarker, diamondMarker } from 'leaflet-shape-markers';\r\n\r\nexport var PointSymbol = Symbol.extend({\r\n\r\n statics: {\r\n MARKERTYPES: ['esriSMSCircle', 'esriSMSCross', 'esriSMSDiamond', 'esriSMSSquare', 'esriSMSX', 'esriPMS']\r\n },\r\n\r\n initialize: function (symbolJson, options) {\r\n var url;\r\n Symbol.prototype.initialize.call(this, symbolJson, options);\r\n if (options) {\r\n this.serviceUrl = options.url;\r\n }\r\n if (symbolJson) {\r\n if (symbolJson.type === 'esriPMS') {\r\n var imageUrl = this._symbolJson.url;\r\n if ((imageUrl && imageUrl.substr(0, 7) === 'http://') || (imageUrl.substr(0, 8) === 'https://')) {\r\n // web image\r\n url = this.sanitize(imageUrl);\r\n this._iconUrl = url;\r\n } else {\r\n url = this.serviceUrl + 'images/' + imageUrl;\r\n this._iconUrl = options && options.token ? url + '?token=' + options.token : url;\r\n }\r\n if (symbolJson.imageData) {\r\n this._iconUrl = 'data:' + symbolJson.contentType + ';base64,' + symbolJson.imageData;\r\n }\r\n // leaflet does not allow resizing icons so keep a hash of different\r\n // icon sizes to try and keep down on the number of icons created\r\n this._icons = {};\r\n // create base icon\r\n this.icon = this._createIcon(this._symbolJson);\r\n } else {\r\n this._fillStyles();\r\n }\r\n }\r\n },\r\n\r\n // prevent html injection in strings\r\n sanitize: function (str) {\r\n if (!str) {\r\n return '';\r\n }\r\n var text;\r\n try {\r\n // removes html but leaves url link text\r\n text = str.replace(/
/gi, '\\n');\r\n text = text.replace(//gi, '\\n');\r\n text = text.replace(/(.*?)<\\/a>/gi, ' $2 ($1) ');\r\n text = text.replace(/<(?:.|\\s)*?>/g, '');\r\n } catch (ex) {\r\n text = null;\r\n }\r\n return text;\r\n },\r\n\r\n _fillStyles: function () {\r\n if (this._symbolJson.outline && this._symbolJson.size > 0 && this._symbolJson.outline.style !== 'esriSLSNull') {\r\n this._styles.stroke = true;\r\n this._styles.weight = this.pixelValue(this._symbolJson.outline.width);\r\n this._styles.color = this.colorValue(this._symbolJson.outline.color);\r\n this._styles.opacity = this.alphaValue(this._symbolJson.outline.color);\r\n } else {\r\n this._styles.stroke = false;\r\n }\r\n if (this._symbolJson.color) {\r\n this._styles.fillColor = this.colorValue(this._symbolJson.color);\r\n this._styles.fillOpacity = this.alphaValue(this._symbolJson.color);\r\n } else {\r\n this._styles.fillOpacity = 0;\r\n }\r\n\r\n if (this._symbolJson.style === 'esriSMSCircle') {\r\n this._styles.radius = this.pixelValue(this._symbolJson.size) / 2.0;\r\n }\r\n },\r\n\r\n _createIcon: function (options) {\r\n var width = this.pixelValue(options.width);\r\n var height = width;\r\n if (options.height) {\r\n height = this.pixelValue(options.height);\r\n }\r\n var xOffset = width / 2.0;\r\n var yOffset = height / 2.0;\r\n\r\n if (options.xoffset) {\r\n xOffset += this.pixelValue(options.xoffset);\r\n }\r\n if (options.yoffset) {\r\n yOffset += this.pixelValue(options.yoffset);\r\n }\r\n\r\n var icon = leafletIcon({\r\n iconUrl: this._iconUrl,\r\n iconSize: [width, height],\r\n iconAnchor: [xOffset, yOffset]\r\n });\r\n this._icons[options.width.toString()] = icon;\r\n return icon;\r\n },\r\n\r\n _getIcon: function (size) {\r\n // check to see if it is already created by size\r\n var icon = this._icons[size.toString()];\r\n if (!icon) {\r\n icon = this._createIcon({width: size});\r\n }\r\n return icon;\r\n },\r\n\r\n pointToLayer: function (geojson, latlng, visualVariables, options) {\r\n var size = this._symbolJson.size || this._symbolJson.width;\r\n if (!this._isDefault) {\r\n if (visualVariables.sizeInfo) {\r\n var calculatedSize = this.getSize(geojson, visualVariables.sizeInfo);\r\n if (calculatedSize) {\r\n size = calculatedSize;\r\n }\r\n }\r\n if (visualVariables.colorInfo) {\r\n var color = this.getColor(geojson, visualVariables.colorInfo);\r\n if (color) {\r\n this._styles.fillColor = this.colorValue(color);\r\n this._styles.fillOpacity = this.alphaValue(color);\r\n }\r\n }\r\n }\r\n\r\n if (this._symbolJson.type === 'esriPMS') {\r\n var layerOptions = extend({}, {icon: this._getIcon(size)}, options);\r\n return marker(latlng, layerOptions);\r\n }\r\n size = this.pixelValue(size);\r\n\r\n switch (this._symbolJson.style) {\r\n case 'esriSMSSquare':\r\n return squareMarker(latlng, size, extend({}, this._styles, options));\r\n case 'esriSMSDiamond':\r\n return diamondMarker(latlng, size, extend({}, this._styles, options));\r\n case 'esriSMSCross':\r\n return crossMarker(latlng, size, extend({}, this._styles, options));\r\n case 'esriSMSX':\r\n return xMarker(latlng, size, extend({}, this._styles, options));\r\n }\r\n this._styles.radius = size / 2.0;\r\n return circleMarker(latlng, extend({}, this._styles, options));\r\n }\r\n});\r\n\r\nexport function pointSymbol (symbolJson, options) {\r\n return new PointSymbol(symbolJson, options);\r\n}\r\n\r\nexport default pointSymbol;\r\n","import Symbol from './Symbol';\r\n\r\nexport var LineSymbol = Symbol.extend({\r\n statics: {\r\n // Not implemented 'esriSLSNull'\r\n LINETYPES: ['esriSLSDash', 'esriSLSDot', 'esriSLSDashDotDot', 'esriSLSDashDot', 'esriSLSSolid']\r\n },\r\n initialize: function (symbolJson, options) {\r\n Symbol.prototype.initialize.call(this, symbolJson, options);\r\n this._fillStyles();\r\n },\r\n\r\n _fillStyles: function () {\r\n // set the defaults that show up on arcgis online\r\n this._styles.lineCap = 'butt';\r\n this._styles.lineJoin = 'miter';\r\n this._styles.fill = false;\r\n this._styles.weight = 0;\r\n\r\n if (!this._symbolJson) {\r\n return this._styles;\r\n }\r\n\r\n if (this._symbolJson.color) {\r\n this._styles.color = this.colorValue(this._symbolJson.color);\r\n this._styles.opacity = this.alphaValue(this._symbolJson.color);\r\n }\r\n\r\n if (!isNaN(this._symbolJson.width)) {\r\n this._styles.weight = this.pixelValue(this._symbolJson.width);\r\n\r\n var dashValues = [];\r\n\r\n switch (this._symbolJson.style) {\r\n case 'esriSLSDash':\r\n dashValues = [4, 3];\r\n break;\r\n case 'esriSLSDot':\r\n dashValues = [1, 3];\r\n break;\r\n case 'esriSLSDashDot':\r\n dashValues = [8, 3, 1, 3];\r\n break;\r\n case 'esriSLSDashDotDot':\r\n dashValues = [8, 3, 1, 3, 1, 3];\r\n break;\r\n }\r\n\r\n // use the dash values and the line weight to set dash array\r\n if (dashValues.length > 0) {\r\n for (var i = 0; i < dashValues.length; i++) {\r\n dashValues[i] *= this._styles.weight;\r\n }\r\n\r\n this._styles.dashArray = dashValues.join(',');\r\n }\r\n }\r\n },\r\n\r\n style: function (feature, visualVariables) {\r\n if (!this._isDefault && visualVariables) {\r\n if (visualVariables.sizeInfo) {\r\n var calculatedSize = this.pixelValue(this.getSize(feature, visualVariables.sizeInfo));\r\n if (calculatedSize) {\r\n this._styles.weight = calculatedSize;\r\n }\r\n }\r\n if (visualVariables.colorInfo) {\r\n var color = this.getColor(feature, visualVariables.colorInfo);\r\n if (color) {\r\n this._styles.color = this.colorValue(color);\r\n this._styles.opacity = this.alphaValue(color);\r\n }\r\n }\r\n }\r\n return this._styles;\r\n }\r\n});\r\n\r\nexport function lineSymbol (symbolJson, options) {\r\n return new LineSymbol(symbolJson, options);\r\n}\r\n\r\nexport default lineSymbol;\r\n","import Symbol from './Symbol';\r\nimport lineSymbol from './LineSymbol';\r\n\r\nexport var PolygonSymbol = Symbol.extend({\r\n statics: {\r\n // not implemented: 'esriSFSBackwardDiagonal','esriSFSCross','esriSFSDiagonalCross','esriSFSForwardDiagonal','esriSFSHorizontal','esriSFSNull','esriSFSVertical'\r\n POLYGONTYPES: ['esriSFSSolid']\r\n },\r\n initialize: function (symbolJson, options) {\r\n Symbol.prototype.initialize.call(this, symbolJson, options);\r\n if (symbolJson) {\r\n if (symbolJson.outline && symbolJson.outline.style === 'esriSLSNull') {\r\n this._lineStyles = { weight: 0 };\r\n } else {\r\n this._lineStyles = lineSymbol(symbolJson.outline, options).style();\r\n }\r\n this._fillStyles();\r\n }\r\n },\r\n\r\n _fillStyles: function () {\r\n if (this._lineStyles) {\r\n if (this._lineStyles.weight === 0) {\r\n // when weight is 0, setting the stroke to false can still look bad\r\n // (gaps between the polygons)\r\n this._styles.stroke = false;\r\n } else {\r\n // copy the line symbol styles into this symbol's styles\r\n for (var styleAttr in this._lineStyles) {\r\n this._styles[styleAttr] = this._lineStyles[styleAttr];\r\n }\r\n }\r\n }\r\n\r\n // set the fill for the polygon\r\n if (this._symbolJson) {\r\n if (this._symbolJson.color &&\r\n // don't fill polygon if type is not supported\r\n PolygonSymbol.POLYGONTYPES.indexOf(this._symbolJson.style >= 0)) {\r\n this._styles.fill = true;\r\n this._styles.fillColor = this.colorValue(this._symbolJson.color);\r\n this._styles.fillOpacity = this.alphaValue(this._symbolJson.color);\r\n } else {\r\n this._styles.fill = false;\r\n this._styles.fillOpacity = 0;\r\n }\r\n }\r\n },\r\n\r\n style: function (feature, visualVariables) {\r\n if (!this._isDefault && visualVariables && visualVariables.colorInfo) {\r\n var color = this.getColor(feature, visualVariables.colorInfo);\r\n if (color) {\r\n this._styles.fillColor = this.colorValue(color);\r\n this._styles.fillOpacity = this.alphaValue(color);\r\n }\r\n }\r\n return this._styles;\r\n }\r\n});\r\n\r\nexport function polygonSymbol (symbolJson, options) {\r\n return new PolygonSymbol(symbolJson, options);\r\n}\r\n\r\nexport default polygonSymbol;\r\n","import { Class, Util, circleMarker } from 'leaflet';\r\n\r\nimport pointSymbol from '../Symbols/PointSymbol';\r\nimport lineSymbol from '../Symbols/LineSymbol';\r\nimport polygonSymbol from '../Symbols/PolygonSymbol';\r\n\r\nexport var Renderer = Class.extend({\r\n options: {\r\n proportionalPolygon: false,\r\n clickable: true\r\n },\r\n\r\n initialize: function (rendererJson, options) {\r\n this._rendererJson = rendererJson;\r\n this._pointSymbols = false;\r\n this._symbols = [];\r\n this._visualVariables = this._parseVisualVariables(rendererJson.visualVariables);\r\n Util.setOptions(this, options);\r\n },\r\n\r\n _parseVisualVariables: function (visualVariables) {\r\n var visVars = {};\r\n if (visualVariables) {\r\n for (var i = 0; i < visualVariables.length; i++) {\r\n visVars[visualVariables[i].type] = visualVariables[i];\r\n }\r\n }\r\n return visVars;\r\n },\r\n\r\n _createDefaultSymbol: function () {\r\n if (this._rendererJson.defaultSymbol) {\r\n this._defaultSymbol = this._newSymbol(this._rendererJson.defaultSymbol);\r\n this._defaultSymbol._isDefault = true;\r\n }\r\n },\r\n\r\n _newSymbol: function (symbolJson) {\r\n if (symbolJson.type === 'esriSMS' || symbolJson.type === 'esriPMS') {\r\n this._pointSymbols = true;\r\n return pointSymbol(symbolJson, this.options);\r\n }\r\n if (symbolJson.type === 'esriSLS') {\r\n return lineSymbol(symbolJson, this.options);\r\n }\r\n if (symbolJson.type === 'esriSFS') {\r\n return polygonSymbol(symbolJson, this.options);\r\n }\r\n },\r\n\r\n _getSymbol: function () {\r\n // override\r\n },\r\n\r\n attachStylesToLayer: function (layer) {\r\n if (this._pointSymbols) {\r\n layer.options.pointToLayer = Util.bind(this.pointToLayer, this);\r\n } else {\r\n layer.options.style = Util.bind(this.style, this);\r\n layer._originalStyle = layer.options.style;\r\n }\r\n },\r\n\r\n pointToLayer: function (geojson, latlng) {\r\n var sym = this._getSymbol(geojson);\r\n if (sym && sym.pointToLayer) {\r\n // right now custom panes are the only option pushed through\r\n return sym.pointToLayer(geojson, latlng, this._visualVariables, this.options);\r\n }\r\n // invisible symbology\r\n return circleMarker(latlng, {radius: 0, opacity: 0});\r\n },\r\n\r\n style: function (feature) {\r\n var userStyles;\r\n if (this.options.userDefinedStyle) {\r\n userStyles = this.options.userDefinedStyle(feature);\r\n }\r\n // find the symbol to represent this feature\r\n var sym = this._getSymbol(feature);\r\n if (sym) {\r\n return this.mergeStyles(sym.style(feature, this._visualVariables), userStyles);\r\n } else {\r\n // invisible symbology\r\n return this.mergeStyles({opacity: 0, fillOpacity: 0}, userStyles);\r\n }\r\n },\r\n\r\n mergeStyles: function (styles, userStyles) {\r\n var mergedStyles = {};\r\n var attr;\r\n // copy renderer style attributes\r\n for (attr in styles) {\r\n if (styles.hasOwnProperty(attr)) {\r\n mergedStyles[attr] = styles[attr];\r\n }\r\n }\r\n // override with user defined style attributes\r\n if (userStyles) {\r\n for (attr in userStyles) {\r\n if (userStyles.hasOwnProperty(attr)) {\r\n mergedStyles[attr] = userStyles[attr];\r\n }\r\n }\r\n }\r\n return mergedStyles;\r\n }\r\n});\r\n\r\nexport default Renderer;\r\n","import Renderer from './Renderer';\r\n\r\nexport var SimpleRenderer = Renderer.extend({\r\n initialize: function (rendererJson, options) {\r\n Renderer.prototype.initialize.call(this, rendererJson, options);\r\n this._createSymbol();\r\n },\r\n\r\n _createSymbol: function () {\r\n if (this._rendererJson.symbol) {\r\n this._symbols.push(this._newSymbol(this._rendererJson.symbol));\r\n }\r\n },\r\n\r\n _getSymbol: function () {\r\n return this._symbols[0];\r\n }\r\n});\r\n\r\nexport function simpleRenderer (rendererJson, options) {\r\n return new SimpleRenderer(rendererJson, options);\r\n}\r\n\r\nexport default simpleRenderer;\r\n","import Renderer from './Renderer';\r\n\r\nexport var ClassBreaksRenderer = Renderer.extend({\r\n initialize: function (rendererJson, options) {\r\n Renderer.prototype.initialize.call(this, rendererJson, options);\r\n this._field = this._rendererJson.field;\r\n if (this._rendererJson.normalizationType && this._rendererJson.normalizationType === 'esriNormalizeByField') {\r\n this._normalizationField = this._rendererJson.normalizationField;\r\n }\r\n this._createSymbols();\r\n },\r\n\r\n _createSymbols: function () {\r\n var symbol;\r\n var classbreaks = this._rendererJson.classBreakInfos;\r\n\r\n this._symbols = [];\r\n\r\n // create a symbol for each class break\r\n for (var i = classbreaks.length - 1; i >= 0; i--) {\r\n if (this.options.proportionalPolygon && this._rendererJson.backgroundFillSymbol) {\r\n symbol = this._newSymbol(this._rendererJson.backgroundFillSymbol);\r\n } else {\r\n symbol = this._newSymbol(classbreaks[i].symbol);\r\n }\r\n symbol.val = classbreaks[i].classMaxValue;\r\n this._symbols.push(symbol);\r\n }\r\n // sort the symbols in ascending value\r\n this._symbols.sort(function (a, b) {\r\n return a.val > b.val ? 1 : -1;\r\n });\r\n this._createDefaultSymbol();\r\n this._maxValue = this._symbols[this._symbols.length - 1].val;\r\n },\r\n\r\n _getSymbol: function (feature) {\r\n var val = feature.properties[this._field];\r\n if (this._normalizationField) {\r\n var normValue = feature.properties[this._normalizationField];\r\n if (!isNaN(normValue) && normValue !== 0) {\r\n val = val / normValue;\r\n } else {\r\n return this._defaultSymbol;\r\n }\r\n }\r\n\r\n if (val > this._maxValue) {\r\n return this._defaultSymbol;\r\n }\r\n var symbol = this._symbols[0];\r\n for (var i = this._symbols.length - 1; i >= 0; i--) {\r\n if (val > this._symbols[i].val) {\r\n break;\r\n }\r\n symbol = this._symbols[i];\r\n }\r\n return symbol;\r\n }\r\n});\r\n\r\nexport function classBreaksRenderer (rendererJson, options) {\r\n return new ClassBreaksRenderer(rendererJson, options);\r\n}\r\n\r\nexport default classBreaksRenderer;\r\n","import Renderer from './Renderer';\r\n\r\nexport var UniqueValueRenderer = Renderer.extend({\r\n initialize: function (rendererJson, options) {\r\n Renderer.prototype.initialize.call(this, rendererJson, options);\r\n this._field = this._rendererJson.field1;\r\n this._createSymbols();\r\n },\r\n\r\n _createSymbols: function () {\r\n var symbol;\r\n var uniques = this._rendererJson.uniqueValueInfos;\r\n\r\n // create a symbol for each unique value\r\n for (var i = uniques.length - 1; i >= 0; i--) {\r\n symbol = this._newSymbol(uniques[i].symbol);\r\n symbol.val = uniques[i].value;\r\n this._symbols.push(symbol);\r\n }\r\n this._createDefaultSymbol();\r\n },\r\n\r\n _getSymbol: function (feature) {\r\n var val = feature.properties[this._field];\r\n // accumulate values if there is more than one field defined\r\n if (this._rendererJson.fieldDelimiter && this._rendererJson.field2) {\r\n var val2 = feature.properties[this._rendererJson.field2];\r\n if (val2) {\r\n val += this._rendererJson.fieldDelimiter + val2;\r\n var val3 = feature.properties[this._rendererJson.field3];\r\n if (val3) {\r\n val += this._rendererJson.fieldDelimiter + val3;\r\n }\r\n }\r\n }\r\n\r\n var symbol = this._defaultSymbol;\r\n for (var i = this._symbols.length - 1; i >= 0; i--) {\r\n // using the === operator does not work if the field\r\n // of the unique renderer is not a string\r\n /*eslint-disable */\r\n if (this._symbols[i].val == val) {\r\n symbol = this._symbols[i];\r\n }\r\n /*eslint-enable */\r\n }\r\n return symbol;\r\n }\r\n});\r\n\r\nexport function uniqueValueRenderer (rendererJson, options) {\r\n return new UniqueValueRenderer(rendererJson, options);\r\n}\r\n\r\nexport default uniqueValueRenderer;\r\n","import { Util, GeoJSON, geoJson } from 'leaflet';\r\nimport * as EsriLeaflet from 'esri-leaflet';\r\nimport * as EsriLeafletCluster from 'esri-leaflet-cluster';\r\nimport classBreaksRenderer from './Renderers/ClassBreaksRenderer';\r\nimport uniqueValueRenderer from './Renderers/UniqueValueRenderer';\r\nimport simpleRenderer from './Renderers/SimpleRenderer';\r\n\r\nfunction wireUpRenderers () {\r\n if (this.options.ignoreRenderer) {\r\n return;\r\n }\r\n var oldOnAdd = Util.bind(this.onAdd, this);\r\n var oldUnbindPopup = Util.bind(this.unbindPopup, this);\r\n var oldOnRemove = Util.bind(this.onRemove, this);\r\n\r\n Util.bind(this.createNewLayer, this);\r\n\r\n this.onAdd = function (map) {\r\n this.metadata(function (error, response) {\r\n if (error) {\r\n console.warn('failed to load metadata from the service.');\r\n return;\r\n } if (response && response.drawingInfo) {\r\n if (this.options.drawingInfo) {\r\n // allow L.esri.webmap (and others) to override service symbology with info provided in layer constructor\r\n response.drawingInfo = this.options.drawingInfo;\r\n }\r\n\r\n // the default pane for lines and polygons is 'overlayPane', for points it is 'markerPane'\r\n if (this.options.pane === 'overlayPane' && response.geometryType === 'esriGeometryPoint') {\r\n this.options.pane = 'markerPane';\r\n }\r\n\r\n this._setRenderers(response);\r\n oldOnAdd(map);\r\n this._addPointLayer(map);\r\n }\r\n }, this);\r\n };\r\n\r\n this.onRemove = function (map) {\r\n oldOnRemove(map);\r\n if (this._pointLayer) {\r\n var pointLayers = this._pointLayer.getLayers();\r\n for (var i in pointLayers) {\r\n map.removeLayer(pointLayers[i]);\r\n }\r\n }\r\n };\r\n\r\n this.unbindPopup = function () {\r\n oldUnbindPopup();\r\n if (this._pointLayer) {\r\n var pointLayers = this._pointLayer.getLayers();\r\n for (var i in pointLayers) {\r\n pointLayers[i].unbindPopup();\r\n }\r\n }\r\n };\r\n\r\n this._addPointLayer = function (map) {\r\n if (this._pointLayer) {\r\n this._pointLayer.addTo(map);\r\n this._pointLayer.bringToFront();\r\n }\r\n };\r\n\r\n this._createPointLayer = function () {\r\n if (!this._pointLayer) {\r\n this._pointLayer = geoJson();\r\n // store the feature ids that have already been added to the map\r\n this._pointLayerIds = {};\r\n\r\n if (this._popup) {\r\n var popupFunction = function (feature, layer) {\r\n layer.bindPopup(this._popup(feature, layer), this._popupOptions);\r\n };\r\n this._pointLayer.options.onEachFeature = Util.bind(popupFunction, this);\r\n }\r\n }\r\n };\r\n\r\n this.createNewLayer = function (geojson) {\r\n var fLayer = GeoJSON.geometryToLayer(geojson, this.options);\r\n\r\n // add a point layer when the polygon is represented as proportional marker symbols\r\n if (this._hasProportionalSymbols) {\r\n var centroid = this.getPolygonCentroid(geojson.geometry.coordinates);\r\n if (!(isNaN(centroid[0]) || isNaN(centroid[0]))) {\r\n this._createPointLayer();\r\n\r\n var featureId = geojson.id.toString();\r\n // only add the feature if it does not already exist on the map\r\n if (!this._pointLayerIds[featureId]) {\r\n var pointjson = this.getPointJson(geojson, centroid);\r\n\r\n this._pointLayer.addData(pointjson);\r\n this._pointLayerIds[featureId] = true;\r\n }\r\n\r\n this._pointLayer.bringToFront();\r\n }\r\n }\r\n return fLayer;\r\n };\r\n\r\n this.getPolygonCentroid = function (coordinates) {\r\n var pts = coordinates[0][0];\r\n if (pts.length === 2) {\r\n pts = coordinates[0];\r\n }\r\n\r\n var twicearea = 0;\r\n var x = 0;\r\n var y = 0;\r\n var nPts = pts.length;\r\n var p1;\r\n var p2;\r\n var f;\r\n\r\n for (var i = 0, j = nPts - 1; i < nPts; j = i++) {\r\n p1 = pts[i]; p2 = pts[j];\r\n twicearea += p1[0] * p2[1];\r\n twicearea -= p1[1] * p2[0];\r\n f = (p1[0] * p2[1]) - (p2[0] * p1[1]);\r\n x += (p1[0] + p2[0]) * f;\r\n y += (p1[1] + p2[1]) * f;\r\n }\r\n f = twicearea * 3;\r\n return [x / f, y / f];\r\n };\r\n\r\n this.getPointJson = function (geojson, centroid) {\r\n return {\r\n type: 'Feature',\r\n properties: geojson.properties,\r\n id: geojson.id,\r\n geometry: {\r\n type: 'Point',\r\n coordinates: [centroid[0], centroid[1]]\r\n }\r\n };\r\n };\r\n\r\n this._checkForProportionalSymbols = function (geometryType, renderer) {\r\n this._hasProportionalSymbols = false;\r\n if (geometryType === 'esriGeometryPolygon') {\r\n if (renderer.backgroundFillSymbol) {\r\n this._hasProportionalSymbols = true;\r\n }\r\n // check to see if the first symbol in the classbreaks is a marker symbol\r\n if (renderer.classBreakInfos && renderer.classBreakInfos.length) {\r\n var sym = renderer.classBreakInfos[0].symbol;\r\n if (sym && (sym.type === 'esriSMS' || sym.type === 'esriPMS')) {\r\n this._hasProportionalSymbols = true;\r\n }\r\n }\r\n }\r\n };\r\n\r\n this._setRenderers = function (serviceInfo) {\r\n var rend;\r\n var rendererInfo = serviceInfo.drawingInfo.renderer;\r\n\r\n var options = {\r\n url: this.options.url\r\n };\r\n\r\n if (this.options.token) {\r\n options.token = this.options.token;\r\n }\r\n\r\n if (this.options.pane) {\r\n options.pane = this.options.pane;\r\n }\r\n\r\n if (serviceInfo.drawingInfo.transparency) {\r\n options.layerTransparency = serviceInfo.drawingInfo.transparency;\r\n }\r\n\r\n if (this.options.style) {\r\n options.userDefinedStyle = this.options.style;\r\n }\r\n\r\n switch (rendererInfo.type) {\r\n case 'classBreaks':\r\n this._checkForProportionalSymbols(serviceInfo.geometryType, rendererInfo);\r\n if (this._hasProportionalSymbols) {\r\n this._createPointLayer();\r\n var pRend = classBreaksRenderer(rendererInfo, options);\r\n pRend.attachStylesToLayer(this._pointLayer);\r\n options.proportionalPolygon = true;\r\n }\r\n rend = classBreaksRenderer(rendererInfo, options);\r\n break;\r\n case 'uniqueValue':\r\n rend = uniqueValueRenderer(rendererInfo, options);\r\n break;\r\n default:\r\n rend = simpleRenderer(rendererInfo, options);\r\n }\r\n rend.attachStylesToLayer(this);\r\n };\r\n}\r\n\r\nEsriLeaflet.FeatureLayer.addInitHook(wireUpRenderers);\r\n\r\nif (typeof EsriLeafletCluster !== 'undefined') {\r\n EsriLeafletCluster.FeatureLayer.addInitHook(wireUpRenderers);\r\n}\r\n"],"names":["Class","L","leafletIcon","extend","marker","circleMarker","Util","geoJson","GeoJSON","EsriLeaflet.FeatureLayer","EsriLeafletCluster.FeatureLayer"],"mappings":";;;;;;;;;;;;;AAEU,MAAC,MAAM,GAAGA,OAAK,CAAC,MAAM,CAAC;EACjC,EAAE,UAAU,EAAE,UAAU,UAAU,EAAE,OAAO,EAAE;EAC7C,IAAI,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;EAClC,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;EACpB,IAAI,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;EACtB,IAAI,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;EAC5B,IAAI,IAAI,CAAC,kBAAkB,GAAG,CAAC,CAAC;EAChC,IAAI,IAAI,OAAO,IAAI,OAAO,CAAC,iBAAiB,EAAE;EAC9C,MAAM,IAAI,CAAC,kBAAkB,GAAG,CAAC,IAAI,OAAO,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;EACxE,KAAK;EACL,GAAG;AACH;EACA;EACA,EAAE,UAAU,EAAE,UAAU,UAAU,EAAE;EACpC,IAAI,OAAO,UAAU,GAAG,KAAK,CAAC;EAC9B,GAAG;AACH;EACA;EACA,EAAE,UAAU,EAAE,UAAU,KAAK,EAAE;EAC/B,IAAI,OAAO,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;EACrE,GAAG;AACH;EACA,EAAE,UAAU,EAAE,UAAU,KAAK,EAAE;EAC/B,IAAI,IAAI,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;EACjC,IAAI,OA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,CAAC;EACrD,KAAK;EACL,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;EACnC,GAAG,CAAC;EACJ,CAAC;AACD;AACAC,0BAAwB,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AACtD;EACA,IAAI,OAAO,kBAAkB,KAAK,WAAW,EAAE;EAC/C,EAAEC,+BAA+B,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;EAC/D;;;;;;;;;;;;;;;;;;;;;;;;;;"}
\ 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..10c2539
--- /dev/null
+++ b/dist/esri-leaflet-renderers.js
@@ -0,0 +1,5 @@
+/* esri-leaflet-renderers - v2.1.1 - Tue Jun 23 2020 10:29:24 GMT-0500 (Central Daylight Time)
+ * Copyright (c) 2020 Environmental Systems Research Institute, Inc.
+ * Apache-2.0 */
+!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("leaflet"),require("esri-leaflet"),require("esri-leaflet-cluster")):"function"==typeof define&&define.amd?define(["exports","leaflet","esri-leaflet","esri-leaflet-cluster"],i):i(((t=t||self).L=t.L||{},t.L.esri=t.L.esri||{},t.L.esri.Renderers={}),t.L,t.L.esri,t.L.esri.Cluster)}(this,function(t,v,i,e){"use strict";var o="default"in v?v.default:v,n=v.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=i.minSize,l=i.maxSize,a=i.minDataValue,h=i.maxDataValue,y=i.normalizationField,u=e?parseFloat(e[y]):void 0;if(null===n||y&&(isNaN(u)||0===u))return null;isNaN(u)||(n/=u),null!==r&&null!==l&&null!==a&&null!==h&&(o=n<=a?r:h<=n?l:r+(n-a)/(h-a)*(l-r)),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 y=i.stops[i.stops.length-1];if(l>=y.value)return y.color;for(var u=0;ul){s=_.color,n=_.value;break}}if(!isNaN(o)&&!isNaN(n)){var c=n-o;if(0/gi,"\n")).replace(//gi,"\n")).replace(/(.*?)<\/a>/gi," $2 ($1) ")).replace(/<(?:.|\s)*?>/g,"")}catch(t){i=null}return i},_fillStyles:function(){this._symbolJson.outline&&0i.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;0<=o&&!(i>this._symbols[o].val);o--)s=this._symbols[o];return s}});function d(t,i){return new f(t,i)}var S=_.extend({initialize:function(t,i){_.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;0<=e;e--)(t=this._newSymbol(i[e].symbol)).val=i[e].value,this._symbols.push(t);this._createDefaultSymbol()},_getSymbol:function(t){var i,e,s=t.properties[this._field];this._rendererJson.fieldDelimiter&&this._rendererJson.field2&&((i=t.properties[this._rendererJson.field2])&&(s+=this._rendererJson.fieldDelimiter+i,(e=t.properties[this._rendererJson.field3])&&(s+=this._rendererJson.fieldDelimiter+e)));for(var o=this._defaultSymbol,n=this._symbols.length-1;0<=n;n--)this._symbols[n].val==s&&(o=this._symbols[n]);return o}});function m(t,i){return new S(t,i)}function b(){var s,e,o;this.options.ignoreRenderer||(s=v.Util.bind(this.onAdd,this),e=v.Util.bind(this.unbindPopup,this),o=v.Util.bind(this.onRemove,this),v.Util.bind(this.createNewLayer,this),this.onAdd=function(e){this.metadata(function(t,i){t?console.warn("failed to load metadata from the service."):i&&i.drawingInfo&&(this.options.drawingInfo&&(i.drawingInfo=this.options.drawingInfo),"overlayPane"===this.options.pane&&"esriGeometryPoint"===i.geometryType&&(this.options.pane="markerPane"),this._setRenderers(i),s(e),this._addPointLayer(e))},this)},this.onRemove=function(t){if(o(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(){this._pointLayer||(this._pointLayer=v.geoJson(),this._pointLayerIds={},this._popup&&(this._pointLayer.options.onEachFeature=v.Util.bind(function(t,i){i.bindPopup(this._popup(t,i),this._popupOptions)},this)))},this.createNewLayer=function(t){var i,e,s,o=v.GeoJSON.geometryToLayer(t,this.options);return this._hasProportionalSymbols&&(i=this.getPolygonCentroid(t.geometry.coordinates),isNaN(i[0])||isNaN(i[0])||(this._createPointLayer(),e=t.id.toString(),this._pointLayerIds[e]||(s=this.getPointJson(t,i),this._pointLayer.addData(s),this._pointLayerIds[e]=!0),this._pointLayer.bringToFront())),o},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,y=a-1;h= maxDataValue) {\r\n size = maxSize;\r\n } else {\r\n featureRatio = (featureValue - minDataValue) / (maxDataValue - minDataValue);\r\n size = minSize + (featureRatio * (maxSize - minSize));\r\n }\r\n }\r\n size = isNaN(size) ? 0 : size;\r\n }\r\n return size;\r\n },\r\n\r\n getColor: function (feature, colorInfo) {\r\n // required information to get color\r\n if (!(feature.properties && colorInfo && colorInfo.field && colorInfo.stops)) {\r\n return null;\r\n }\r\n\r\n var attr = feature.properties;\r\n var featureValue = attr[colorInfo.field];\r\n var lowerBoundColor, upperBoundColor, lowerBound, upperBound;\r\n var normField = colorInfo.normalizationField;\r\n var normValue = attr ? parseFloat(attr[normField]) : undefined;\r\n if (featureValue === null || (normField && ((isNaN(normValue) || normValue === 0)))) {\r\n return null;\r\n }\r\n\r\n if (!isNaN(normValue)) {\r\n featureValue /= normValue;\r\n }\r\n\r\n if (featureValue <= colorInfo.stops[0].value) {\r\n return colorInfo.stops[0].color;\r\n }\r\n var lastStop = colorInfo.stops[colorInfo.stops.length - 1];\r\n if (featureValue >= lastStop.value) {\r\n return lastStop.color;\r\n }\r\n\r\n // go through the stops to find min and max\r\n for (var i = 0; i < colorInfo.stops.length; i++) {\r\n var stopInfo = colorInfo.stops[i];\r\n\r\n if (stopInfo.value <= featureValue) {\r\n lowerBoundColor = stopInfo.color;\r\n lowerBound = stopInfo.value;\r\n } else if (stopInfo.value > featureValue) {\r\n upperBoundColor = stopInfo.color;\r\n upperBound = stopInfo.value;\r\n break;\r\n }\r\n }\r\n\r\n // feature falls between two stops, interplate the colors\r\n if (!isNaN(lowerBound) && !isNaN(upperBound)) {\r\n var range = upperBound - lowerBound;\r\n if (range > 0) {\r\n // more weight the further it is from the lower bound\r\n var upperBoundColorWeight = (featureValue - lowerBound) / range;\r\n if (upperBoundColorWeight) {\r\n // more weight the further it is from the upper bound\r\n var lowerBoundColorWeight = (upperBound - featureValue) / range;\r\n if (lowerBoundColorWeight) {\r\n // interpolate the lower and upper bound color by applying the\r\n // weights to each of the rgba colors and adding them together\r\n var interpolatedColor = [];\r\n for (var j = 0; j < 4; j++) {\r\n interpolatedColor[j] = Math.round((lowerBoundColor[j] * lowerBoundColorWeight) + (upperBoundColor[j] * upperBoundColorWeight));\r\n }\r\n return interpolatedColor;\r\n } else {\r\n // no difference between featureValue and upperBound, 100% of upperBoundColor\r\n return upperBoundColor;\r\n }\r\n } else {\r\n // no difference between featureValue and lowerBound, 100% of lowerBoundColor\r\n return lowerBoundColor;\r\n }\r\n }\r\n }\r\n // if we get to here, none of the cases apply so return null\r\n return null;\r\n }\r\n});\r\n\r\n// export function symbol (symbolJson) {\r\n// return new Symbol(symbolJson);\r\n// }\r\n\r\nexport default Symbol;\r\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 {\r\n marker,\r\n icon as leafletIcon,\r\n extend,\r\n circleMarker\r\n} from 'leaflet';\r\nimport Symbol from './Symbol';\r\nimport { squareMarker, xMarker, crossMarker, diamondMarker } from 'leaflet-shape-markers';\r\n\r\nexport var PointSymbol = Symbol.extend({\r\n\r\n statics: {\r\n MARKERTYPES: ['esriSMSCircle', 'esriSMSCross', 'esriSMSDiamond', 'esriSMSSquare', 'esriSMSX', 'esriPMS']\r\n },\r\n\r\n initialize: function (symbolJson, options) {\r\n var url;\r\n Symbol.prototype.initialize.call(this, symbolJson, options);\r\n if (options) {\r\n this.serviceUrl = options.url;\r\n }\r\n if (symbolJson) {\r\n if (symbolJson.type === 'esriPMS') {\r\n var imageUrl = this._symbolJson.url;\r\n if ((imageUrl && imageUrl.substr(0, 7) === 'http://') || (imageUrl.substr(0, 8) === 'https://')) {\r\n // web image\r\n url = this.sanitize(imageUrl);\r\n this._iconUrl = url;\r\n } else {\r\n url = this.serviceUrl + 'images/' + imageUrl;\r\n this._iconUrl = options && options.token ? url + '?token=' + options.token : url;\r\n }\r\n if (symbolJson.imageData) {\r\n this._iconUrl = 'data:' + symbolJson.contentType + ';base64,' + symbolJson.imageData;\r\n }\r\n // leaflet does not allow resizing icons so keep a hash of different\r\n // icon sizes to try and keep down on the number of icons created\r\n this._icons = {};\r\n // create base icon\r\n this.icon = this._createIcon(this._symbolJson);\r\n } else {\r\n this._fillStyles();\r\n }\r\n }\r\n },\r\n\r\n // prevent html injection in strings\r\n sanitize: function (str) {\r\n if (!str) {\r\n return '';\r\n }\r\n var text;\r\n try {\r\n // removes html but leaves url link text\r\n text = str.replace(/
/gi, '\\n');\r\n text = text.replace(//gi, '\\n');\r\n text = text.replace(/(.*?)<\\/a>/gi, ' $2 ($1) ');\r\n text = text.replace(/<(?:.|\\s)*?>/g, '');\r\n } catch (ex) {\r\n text = null;\r\n }\r\n return text;\r\n },\r\n\r\n _fillStyles: function () {\r\n if (this._symbolJson.outline && this._symbolJson.size > 0 && this._symbolJson.outline.style !== 'esriSLSNull') {\r\n this._styles.stroke = true;\r\n this._styles.weight = this.pixelValue(this._symbolJson.outline.width);\r\n this._styles.color = this.colorValue(this._symbolJson.outline.color);\r\n this._styles.opacity = this.alphaValue(this._symbolJson.outline.color);\r\n } else {\r\n this._styles.stroke = false;\r\n }\r\n if (this._symbolJson.color) {\r\n this._styles.fillColor = this.colorValue(this._symbolJson.color);\r\n this._styles.fillOpacity = this.alphaValue(this._symbolJson.color);\r\n } else {\r\n this._styles.fillOpacity = 0;\r\n }\r\n\r\n if (this._symbolJson.style === 'esriSMSCircle') {\r\n this._styles.radius = this.pixelValue(this._symbolJson.size) / 2.0;\r\n }\r\n },\r\n\r\n _createIcon: function (options) {\r\n var width = this.pixelValue(options.width);\r\n var height = width;\r\n if (options.height) {\r\n height = this.pixelValue(options.height);\r\n }\r\n var xOffset = width / 2.0;\r\n var yOffset = height / 2.0;\r\n\r\n if (options.xoffset) {\r\n xOffset += this.pixelValue(options.xoffset);\r\n }\r\n if (options.yoffset) {\r\n yOffset += this.pixelValue(options.yoffset);\r\n }\r\n\r\n var icon = leafletIcon({\r\n iconUrl: this._iconUrl,\r\n iconSize: [width, height],\r\n iconAnchor: [xOffset, yOffset]\r\n });\r\n this._icons[options.width.toString()] = icon;\r\n return icon;\r\n },\r\n\r\n _getIcon: function (size) {\r\n // check to see if it is already created by size\r\n var icon = this._icons[size.toString()];\r\n if (!icon) {\r\n icon = this._createIcon({width: size});\r\n }\r\n return icon;\r\n },\r\n\r\n pointToLayer: function (geojson, latlng, visualVariables, options) {\r\n var size = this._symbolJson.size || this._symbolJson.width;\r\n if (!this._isDefault) {\r\n if (visualVariables.sizeInfo) {\r\n var calculatedSize = this.getSize(geojson, visualVariables.sizeInfo);\r\n if (calculatedSize) {\r\n size = calculatedSize;\r\n }\r\n }\r\n if (visualVariables.colorInfo) {\r\n var color = this.getColor(geojson, visualVariables.colorInfo);\r\n if (color) {\r\n this._styles.fillColor = this.colorValue(color);\r\n this._styles.fillOpacity = this.alphaValue(color);\r\n }\r\n }\r\n }\r\n\r\n if (this._symbolJson.type === 'esriPMS') {\r\n var layerOptions = extend({}, {icon: this._getIcon(size)}, options);\r\n return marker(latlng, layerOptions);\r\n }\r\n size = this.pixelValue(size);\r\n\r\n switch (this._symbolJson.style) {\r\n case 'esriSMSSquare':\r\n return squareMarker(latlng, size, extend({}, this._styles, options));\r\n case 'esriSMSDiamond':\r\n return diamondMarker(latlng, size, extend({}, this._styles, options));\r\n case 'esriSMSCross':\r\n return crossMarker(latlng, size, extend({}, this._styles, options));\r\n case 'esriSMSX':\r\n return xMarker(latlng, size, extend({}, this._styles, options));\r\n }\r\n this._styles.radius = size / 2.0;\r\n return circleMarker(latlng, extend({}, this._styles, options));\r\n }\r\n});\r\n\r\nexport function pointSymbol (symbolJson, options) {\r\n return new PointSymbol(symbolJson, options);\r\n}\r\n\r\nexport default pointSymbol;\r\n","import Symbol from './Symbol';\r\n\r\nexport var LineSymbol = Symbol.extend({\r\n statics: {\r\n // Not implemented 'esriSLSNull'\r\n LINETYPES: ['esriSLSDash', 'esriSLSDot', 'esriSLSDashDotDot', 'esriSLSDashDot', 'esriSLSSolid']\r\n },\r\n initialize: function (symbolJson, options) {\r\n Symbol.prototype.initialize.call(this, symbolJson, options);\r\n this._fillStyles();\r\n },\r\n\r\n _fillStyles: function () {\r\n // set the defaults that show up on arcgis online\r\n this._styles.lineCap = 'butt';\r\n this._styles.lineJoin = 'miter';\r\n this._styles.fill = false;\r\n this._styles.weight = 0;\r\n\r\n if (!this._symbolJson) {\r\n return this._styles;\r\n }\r\n\r\n if (this._symbolJson.color) {\r\n this._styles.color = this.colorValue(this._symbolJson.color);\r\n this._styles.opacity = this.alphaValue(this._symbolJson.color);\r\n }\r\n\r\n if (!isNaN(this._symbolJson.width)) {\r\n this._styles.weight = this.pixelValue(this._symbolJson.width);\r\n\r\n var dashValues = [];\r\n\r\n switch (this._symbolJson.style) {\r\n case 'esriSLSDash':\r\n dashValues = [4, 3];\r\n break;\r\n case 'esriSLSDot':\r\n dashValues = [1, 3];\r\n break;\r\n case 'esriSLSDashDot':\r\n dashValues = [8, 3, 1, 3];\r\n break;\r\n case 'esriSLSDashDotDot':\r\n dashValues = [8, 3, 1, 3, 1, 3];\r\n break;\r\n }\r\n\r\n // use the dash values and the line weight to set dash array\r\n if (dashValues.length > 0) {\r\n for (var i = 0; i < dashValues.length; i++) {\r\n dashValues[i] *= this._styles.weight;\r\n }\r\n\r\n this._styles.dashArray = dashValues.join(',');\r\n }\r\n }\r\n },\r\n\r\n style: function (feature, visualVariables) {\r\n if (!this._isDefault && visualVariables) {\r\n if (visualVariables.sizeInfo) {\r\n var calculatedSize = this.pixelValue(this.getSize(feature, visualVariables.sizeInfo));\r\n if (calculatedSize) {\r\n this._styles.weight = calculatedSize;\r\n }\r\n }\r\n if (visualVariables.colorInfo) {\r\n var color = this.getColor(feature, visualVariables.colorInfo);\r\n if (color) {\r\n this._styles.color = this.colorValue(color);\r\n this._styles.opacity = this.alphaValue(color);\r\n }\r\n }\r\n }\r\n return this._styles;\r\n }\r\n});\r\n\r\nexport function lineSymbol (symbolJson, options) {\r\n return new LineSymbol(symbolJson, options);\r\n}\r\n\r\nexport default lineSymbol;\r\n","import Symbol from './Symbol';\r\nimport lineSymbol from './LineSymbol';\r\n\r\nexport var PolygonSymbol = Symbol.extend({\r\n statics: {\r\n // not implemented: 'esriSFSBackwardDiagonal','esriSFSCross','esriSFSDiagonalCross','esriSFSForwardDiagonal','esriSFSHorizontal','esriSFSNull','esriSFSVertical'\r\n POLYGONTYPES: ['esriSFSSolid']\r\n },\r\n initialize: function (symbolJson, options) {\r\n Symbol.prototype.initialize.call(this, symbolJson, options);\r\n if (symbolJson) {\r\n if (symbolJson.outline && symbolJson.outline.style === 'esriSLSNull') {\r\n this._lineStyles = { weight: 0 };\r\n } else {\r\n this._lineStyles = lineSymbol(symbolJson.outline, options).style();\r\n }\r\n this._fillStyles();\r\n }\r\n },\r\n\r\n _fillStyles: function () {\r\n if (this._lineStyles) {\r\n if (this._lineStyles.weight === 0) {\r\n // when weight is 0, setting the stroke to false can still look bad\r\n // (gaps between the polygons)\r\n this._styles.stroke = false;\r\n } else {\r\n // copy the line symbol styles into this symbol's styles\r\n for (var styleAttr in this._lineStyles) {\r\n this._styles[styleAttr] = this._lineStyles[styleAttr];\r\n }\r\n }\r\n }\r\n\r\n // set the fill for the polygon\r\n if (this._symbolJson) {\r\n if (this._symbolJson.color &&\r\n // don't fill polygon if type is not supported\r\n PolygonSymbol.POLYGONTYPES.indexOf(this._symbolJson.style >= 0)) {\r\n this._styles.fill = true;\r\n this._styles.fillColor = this.colorValue(this._symbolJson.color);\r\n this._styles.fillOpacity = this.alphaValue(this._symbolJson.color);\r\n } else {\r\n this._styles.fill = false;\r\n this._styles.fillOpacity = 0;\r\n }\r\n }\r\n },\r\n\r\n style: function (feature, visualVariables) {\r\n if (!this._isDefault && visualVariables && visualVariables.colorInfo) {\r\n var color = this.getColor(feature, visualVariables.colorInfo);\r\n if (color) {\r\n this._styles.fillColor = this.colorValue(color);\r\n this._styles.fillOpacity = this.alphaValue(color);\r\n }\r\n }\r\n return this._styles;\r\n }\r\n});\r\n\r\nexport function polygonSymbol (symbolJson, options) {\r\n return new PolygonSymbol(symbolJson, options);\r\n}\r\n\r\nexport default polygonSymbol;\r\n","import { Class, Util, circleMarker } from 'leaflet';\r\n\r\nimport pointSymbol from '../Symbols/PointSymbol';\r\nimport lineSymbol from '../Symbols/LineSymbol';\r\nimport polygonSymbol from '../Symbols/PolygonSymbol';\r\n\r\nexport var Renderer = Class.extend({\r\n options: {\r\n proportionalPolygon: false,\r\n clickable: true\r\n },\r\n\r\n initialize: function (rendererJson, options) {\r\n this._rendererJson = rendererJson;\r\n this._pointSymbols = false;\r\n this._symbols = [];\r\n this._visualVariables = this._parseVisualVariables(rendererJson.visualVariables);\r\n Util.setOptions(this, options);\r\n },\r\n\r\n _parseVisualVariables: function (visualVariables) {\r\n var visVars = {};\r\n if (visualVariables) {\r\n for (var i = 0; i < visualVariables.length; i++) {\r\n visVars[visualVariables[i].type] = visualVariables[i];\r\n }\r\n }\r\n return visVars;\r\n },\r\n\r\n _createDefaultSymbol: function () {\r\n if (this._rendererJson.defaultSymbol) {\r\n this._defaultSymbol = this._newSymbol(this._rendererJson.defaultSymbol);\r\n this._defaultSymbol._isDefault = true;\r\n }\r\n },\r\n\r\n _newSymbol: function (symbolJson) {\r\n if (symbolJson.type === 'esriSMS' || symbolJson.type === 'esriPMS') {\r\n this._pointSymbols = true;\r\n return pointSymbol(symbolJson, this.options);\r\n }\r\n if (symbolJson.type === 'esriSLS') {\r\n return lineSymbol(symbolJson, this.options);\r\n }\r\n if (symbolJson.type === 'esriSFS') {\r\n return polygonSymbol(symbolJson, this.options);\r\n }\r\n },\r\n\r\n _getSymbol: function () {\r\n // override\r\n },\r\n\r\n attachStylesToLayer: function (layer) {\r\n if (this._pointSymbols) {\r\n layer.options.pointToLayer = Util.bind(this.pointToLayer, this);\r\n } else {\r\n layer.options.style = Util.bind(this.style, this);\r\n layer._originalStyle = layer.options.style;\r\n }\r\n },\r\n\r\n pointToLayer: function (geojson, latlng) {\r\n var sym = this._getSymbol(geojson);\r\n if (sym && sym.pointToLayer) {\r\n // right now custom panes are the only option pushed through\r\n return sym.pointToLayer(geojson, latlng, this._visualVariables, this.options);\r\n }\r\n // invisible symbology\r\n return circleMarker(latlng, {radius: 0, opacity: 0});\r\n },\r\n\r\n style: function (feature) {\r\n var userStyles;\r\n if (this.options.userDefinedStyle) {\r\n userStyles = this.options.userDefinedStyle(feature);\r\n }\r\n // find the symbol to represent this feature\r\n var sym = this._getSymbol(feature);\r\n if (sym) {\r\n return this.mergeStyles(sym.style(feature, this._visualVariables), userStyles);\r\n } else {\r\n // invisible symbology\r\n return this.mergeStyles({opacity: 0, fillOpacity: 0}, userStyles);\r\n }\r\n },\r\n\r\n mergeStyles: function (styles, userStyles) {\r\n var mergedStyles = {};\r\n var attr;\r\n // copy renderer style attributes\r\n for (attr in styles) {\r\n if (styles.hasOwnProperty(attr)) {\r\n mergedStyles[attr] = styles[attr];\r\n }\r\n }\r\n // override with user defined style attributes\r\n if (userStyles) {\r\n for (attr in userStyles) {\r\n if (userStyles.hasOwnProperty(attr)) {\r\n mergedStyles[attr] = userStyles[attr];\r\n }\r\n }\r\n }\r\n return mergedStyles;\r\n }\r\n});\r\n\r\nexport default Renderer;\r\n","import Renderer from './Renderer';\r\n\r\nexport var SimpleRenderer = Renderer.extend({\r\n initialize: function (rendererJson, options) {\r\n Renderer.prototype.initialize.call(this, rendererJson, options);\r\n this._createSymbol();\r\n },\r\n\r\n _createSymbol: function () {\r\n if (this._rendererJson.symbol) {\r\n this._symbols.push(this._newSymbol(this._rendererJson.symbol));\r\n }\r\n },\r\n\r\n _getSymbol: function () {\r\n return this._symbols[0];\r\n }\r\n});\r\n\r\nexport function simpleRenderer (rendererJson, options) {\r\n return new SimpleRenderer(rendererJson, options);\r\n}\r\n\r\nexport default simpleRenderer;\r\n","import Renderer from './Renderer';\r\n\r\nexport var ClassBreaksRenderer = Renderer.extend({\r\n initialize: function (rendererJson, options) {\r\n Renderer.prototype.initialize.call(this, rendererJson, options);\r\n this._field = this._rendererJson.field;\r\n if (this._rendererJson.normalizationType && this._rendererJson.normalizationType === 'esriNormalizeByField') {\r\n this._normalizationField = this._rendererJson.normalizationField;\r\n }\r\n this._createSymbols();\r\n },\r\n\r\n _createSymbols: function () {\r\n var symbol;\r\n var classbreaks = this._rendererJson.classBreakInfos;\r\n\r\n this._symbols = [];\r\n\r\n // create a symbol for each class break\r\n for (var i = classbreaks.length - 1; i >= 0; i--) {\r\n if (this.options.proportionalPolygon && this._rendererJson.backgroundFillSymbol) {\r\n symbol = this._newSymbol(this._rendererJson.backgroundFillSymbol);\r\n } else {\r\n symbol = this._newSymbol(classbreaks[i].symbol);\r\n }\r\n symbol.val = classbreaks[i].classMaxValue;\r\n this._symbols.push(symbol);\r\n }\r\n // sort the symbols in ascending value\r\n this._symbols.sort(function (a, b) {\r\n return a.val > b.val ? 1 : -1;\r\n });\r\n this._createDefaultSymbol();\r\n this._maxValue = this._symbols[this._symbols.length - 1].val;\r\n },\r\n\r\n _getSymbol: function (feature) {\r\n var val = feature.properties[this._field];\r\n if (this._normalizationField) {\r\n var normValue = feature.properties[this._normalizationField];\r\n if (!isNaN(normValue) && normValue !== 0) {\r\n val = val / normValue;\r\n } else {\r\n return this._defaultSymbol;\r\n }\r\n }\r\n\r\n if (val > this._maxValue) {\r\n return this._defaultSymbol;\r\n }\r\n var symbol = this._symbols[0];\r\n for (var i = this._symbols.length - 1; i >= 0; i--) {\r\n if (val > this._symbols[i].val) {\r\n break;\r\n }\r\n symbol = this._symbols[i];\r\n }\r\n return symbol;\r\n }\r\n});\r\n\r\nexport function classBreaksRenderer (rendererJson, options) {\r\n return new ClassBreaksRenderer(rendererJson, options);\r\n}\r\n\r\nexport default classBreaksRenderer;\r\n","import Renderer from './Renderer';\r\n\r\nexport var UniqueValueRenderer = Renderer.extend({\r\n initialize: function (rendererJson, options) {\r\n Renderer.prototype.initialize.call(this, rendererJson, options);\r\n this._field = this._rendererJson.field1;\r\n this._createSymbols();\r\n },\r\n\r\n _createSymbols: function () {\r\n var symbol;\r\n var uniques = this._rendererJson.uniqueValueInfos;\r\n\r\n // create a symbol for each unique value\r\n for (var i = uniques.length - 1; i >= 0; i--) {\r\n symbol = this._newSymbol(uniques[i].symbol);\r\n symbol.val = uniques[i].value;\r\n this._symbols.push(symbol);\r\n }\r\n this._createDefaultSymbol();\r\n },\r\n\r\n _getSymbol: function (feature) {\r\n var val = feature.properties[this._field];\r\n // accumulate values if there is more than one field defined\r\n if (this._rendererJson.fieldDelimiter && this._rendererJson.field2) {\r\n var val2 = feature.properties[this._rendererJson.field2];\r\n if (val2) {\r\n val += this._rendererJson.fieldDelimiter + val2;\r\n var val3 = feature.properties[this._rendererJson.field3];\r\n if (val3) {\r\n val += this._rendererJson.fieldDelimiter + val3;\r\n }\r\n }\r\n }\r\n\r\n var symbol = this._defaultSymbol;\r\n for (var i = this._symbols.length - 1; i >= 0; i--) {\r\n // using the === operator does not work if the field\r\n // of the unique renderer is not a string\r\n /*eslint-disable */\r\n if (this._symbols[i].val == val) {\r\n symbol = this._symbols[i];\r\n }\r\n /*eslint-enable */\r\n }\r\n return symbol;\r\n }\r\n});\r\n\r\nexport function uniqueValueRenderer (rendererJson, options) {\r\n return new UniqueValueRenderer(rendererJson, options);\r\n}\r\n\r\nexport default uniqueValueRenderer;\r\n","import { Util, GeoJSON, geoJson } from 'leaflet';\r\nimport * as EsriLeaflet from 'esri-leaflet';\r\nimport * as EsriLeafletCluster from 'esri-leaflet-cluster';\r\nimport classBreaksRenderer from './Renderers/ClassBreaksRenderer';\r\nimport uniqueValueRenderer from './Renderers/UniqueValueRenderer';\r\nimport simpleRenderer from './Renderers/SimpleRenderer';\r\n\r\nfunction wireUpRenderers () {\r\n if (this.options.ignoreRenderer) {\r\n return;\r\n }\r\n var oldOnAdd = Util.bind(this.onAdd, this);\r\n var oldUnbindPopup = Util.bind(this.unbindPopup, this);\r\n var oldOnRemove = Util.bind(this.onRemove, this);\r\n\r\n Util.bind(this.createNewLayer, this);\r\n\r\n this.onAdd = function (map) {\r\n this.metadata(function (error, response) {\r\n if (error) {\r\n console.warn('failed to load metadata from the service.');\r\n return;\r\n } if (response && response.drawingInfo) {\r\n if (this.options.drawingInfo) {\r\n // allow L.esri.webmap (and others) to override service symbology with info provided in layer constructor\r\n response.drawingInfo = this.options.drawingInfo;\r\n }\r\n\r\n // the default pane for lines and polygons is 'overlayPane', for points it is 'markerPane'\r\n if (this.options.pane === 'overlayPane' && response.geometryType === 'esriGeometryPoint') {\r\n this.options.pane = 'markerPane';\r\n }\r\n\r\n this._setRenderers(response);\r\n oldOnAdd(map);\r\n this._addPointLayer(map);\r\n }\r\n }, this);\r\n };\r\n\r\n this.onRemove = function (map) {\r\n oldOnRemove(map);\r\n if (this._pointLayer) {\r\n var pointLayers = this._pointLayer.getLayers();\r\n for (var i in pointLayers) {\r\n map.removeLayer(pointLayers[i]);\r\n }\r\n }\r\n };\r\n\r\n this.unbindPopup = function () {\r\n oldUnbindPopup();\r\n if (this._pointLayer) {\r\n var pointLayers = this._pointLayer.getLayers();\r\n for (var i in pointLayers) {\r\n pointLayers[i].unbindPopup();\r\n }\r\n }\r\n };\r\n\r\n this._addPointLayer = function (map) {\r\n if (this._pointLayer) {\r\n this._pointLayer.addTo(map);\r\n this._pointLayer.bringToFront();\r\n }\r\n };\r\n\r\n this._createPointLayer = function () {\r\n if (!this._pointLayer) {\r\n this._pointLayer = geoJson();\r\n // store the feature ids that have already been added to the map\r\n this._pointLayerIds = {};\r\n\r\n if (this._popup) {\r\n var popupFunction = function (feature, layer) {\r\n layer.bindPopup(this._popup(feature, layer), this._popupOptions);\r\n };\r\n this._pointLayer.options.onEachFeature = Util.bind(popupFunction, this);\r\n }\r\n }\r\n };\r\n\r\n this.createNewLayer = function (geojson) {\r\n var fLayer = GeoJSON.geometryToLayer(geojson, this.options);\r\n\r\n // add a point layer when the polygon is represented as proportional marker symbols\r\n if (this._hasProportionalSymbols) {\r\n var centroid = this.getPolygonCentroid(geojson.geometry.coordinates);\r\n if (!(isNaN(centroid[0]) || isNaN(centroid[0]))) {\r\n this._createPointLayer();\r\n\r\n var featureId = geojson.id.toString();\r\n // only add the feature if it does not already exist on the map\r\n if (!this._pointLayerIds[featureId]) {\r\n var pointjson = this.getPointJson(geojson, centroid);\r\n\r\n this._pointLayer.addData(pointjson);\r\n this._pointLayerIds[featureId] = true;\r\n }\r\n\r\n this._pointLayer.bringToFront();\r\n }\r\n }\r\n return fLayer;\r\n };\r\n\r\n this.getPolygonCentroid = function (coordinates) {\r\n var pts = coordinates[0][0];\r\n if (pts.length === 2) {\r\n pts = coordinates[0];\r\n }\r\n\r\n var twicearea = 0;\r\n var x = 0;\r\n var y = 0;\r\n var nPts = pts.length;\r\n var p1;\r\n var p2;\r\n var f;\r\n\r\n for (var i = 0, j = nPts - 1; i < nPts; j = i++) {\r\n p1 = pts[i]; p2 = pts[j];\r\n twicearea += p1[0] * p2[1];\r\n twicearea -= p1[1] * p2[0];\r\n f = (p1[0] * p2[1]) - (p2[0] * p1[1]);\r\n x += (p1[0] + p2[0]) * f;\r\n y += (p1[1] + p2[1]) * f;\r\n }\r\n f = twicearea * 3;\r\n return [x / f, y / f];\r\n };\r\n\r\n this.getPointJson = function (geojson, centroid) {\r\n return {\r\n type: 'Feature',\r\n properties: geojson.properties,\r\n id: geojson.id,\r\n geometry: {\r\n type: 'Point',\r\n coordinates: [centroid[0], centroid[1]]\r\n }\r\n };\r\n };\r\n\r\n this._checkForProportionalSymbols = function (geometryType, renderer) {\r\n this._hasProportionalSymbols = false;\r\n if (geometryType === 'esriGeometryPolygon') {\r\n if (renderer.backgroundFillSymbol) {\r\n this._hasProportionalSymbols = true;\r\n }\r\n // check to see if the first symbol in the classbreaks is a marker symbol\r\n if (renderer.classBreakInfos && renderer.classBreakInfos.length) {\r\n var sym = renderer.classBreakInfos[0].symbol;\r\n if (sym && (sym.type === 'esriSMS' || sym.type === 'esriPMS')) {\r\n this._hasProportionalSymbols = true;\r\n }\r\n }\r\n }\r\n };\r\n\r\n this._setRenderers = function (serviceInfo) {\r\n var rend;\r\n var rendererInfo = serviceInfo.drawingInfo.renderer;\r\n\r\n var options = {\r\n url: this.options.url\r\n };\r\n\r\n if (this.options.token) {\r\n options.token = this.options.token;\r\n }\r\n\r\n if (this.options.pane) {\r\n options.pane = this.options.pane;\r\n }\r\n\r\n if (serviceInfo.drawingInfo.transparency) {\r\n options.layerTransparency = serviceInfo.drawingInfo.transparency;\r\n }\r\n\r\n if (this.options.style) {\r\n options.userDefinedStyle = this.options.style;\r\n }\r\n\r\n switch (rendererInfo.type) {\r\n case 'classBreaks':\r\n this._checkForProportionalSymbols(serviceInfo.geometryType, rendererInfo);\r\n if (this._hasProportionalSymbols) {\r\n this._createPointLayer();\r\n var pRend = classBreaksRenderer(rendererInfo, options);\r\n pRend.attachStylesToLayer(this._pointLayer);\r\n options.proportionalPolygon = true;\r\n }\r\n rend = classBreaksRenderer(rendererInfo, options);\r\n break;\r\n case 'uniqueValue':\r\n rend = uniqueValueRenderer(rendererInfo, options);\r\n break;\r\n default:\r\n rend = simpleRenderer(rendererInfo, options);\r\n }\r\n rend.attachStylesToLayer(this);\r\n };\r\n}\r\n\r\nEsriLeaflet.FeatureLayer.addInitHook(wireUpRenderers);\r\n\r\nif (typeof EsriLeafletCluster !== 'undefined') {\r\n EsriLeafletCluster.FeatureLayer.addInitHook(wireUpRenderers);\r\n}\r\n"],"names":["Symbol","Class","extend","initialize","symbolJson","options","this","_symbolJson","val","_styles","_isDefault","_layerTransparency","layerTransparency","pixelValue","pointValue","colorValue","color","alphaValue","getSize","feature","sizeInfo","attr","properties","field","size","featureValue","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","L","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","XMarker","_updateXMarker","SquareMarker","fill","_updateSquareMarker","closePath","svg","DiamondMarker","_updateDiamondMarker","PointSymbol","statics","MARKERTYPES","url","imageUrl","serviceUrl","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","leafletIcon","iconUrl","iconSize","iconAnchor","toString","_getIcon","pointToLayer","geojson","visualVariables","calculatedSize","layerOptions","marker","circleMarker","pointSymbol","LineSymbol","LINETYPES","lineCap","lineJoin","dashValues","dashArray","join","lineSymbol","PolygonSymbol","POLYGONTYPES","_lineStyles","styleAttr","indexOf","polygonSymbol","Renderer","proportionalPolygon","clickable","rendererJson","_rendererJson","_pointSymbols","_symbols","_visualVariables","_parseVisualVariables","Util","visVars","_createDefaultSymbol","defaultSymbol","_defaultSymbol","_newSymbol","_getSymbol","attachStylesToLayer","bind","_originalStyle","sym","userStyles","userDefinedStyle","mergeStyles","styles","mergedStyles","hasOwnProperty","SimpleRenderer","_createSymbol","symbol","push","simpleRenderer","ClassBreaksRenderer","_field","normalizationType","_normalizationField","_createSymbols","classbreaks","classBreakInfos","backgroundFillSymbol","classMaxValue","sort","a","b","_maxValue","classBreaksRenderer","UniqueValueRenderer","field1","uniques","uniqueValueInfos","val2","val3","fieldDelimiter","field2","field3","uniqueValueRenderer","wireUpRenderers","oldOnAdd","oldUnbindPopup","oldOnRemove","ignoreRenderer","onAdd","unbindPopup","onRemove","createNewLayer","map","metadata","error","response","console","warn","drawingInfo","pane","geometryType","_setRenderers","_addPointLayer","_pointLayer","pointLayers","getLayers","removeLayer","addTo","bringToFront","_createPointLayer","geoJson","_pointLayerIds","_popup","onEachFeature","bindPopup","_popupOptions","centroid","featureId","pointjson","fLayer","geometryToLayer","_hasProportionalSymbols","getPolygonCentroid","geometry","id","getPointJson","addData","pts","p1","p2","f","twicearea","nPts","_checkForProportionalSymbols","renderer","serviceInfo","rend","rendererInfo","transparency","addInitHook","EsriLeafletCluster","EsriLeafletCluster.FeatureLayer"],"mappings":";;;gbAEWA,EAASC,QAAMC,OAAO,CAC/BC,WAAY,SAAUC,EAAYC,GAChCC,KAAKC,YAAcH,EACnBE,KAAKE,IAAM,KACXF,KAAKG,QAAU,GACfH,KAAKI,YAAa,EAClBJ,KAAKK,mBAAqB,EACtBN,GAAWA,EAAQO,oBACrBN,KAAKK,mBAAqB,EAAKN,EAAQO,kBAAoB,MAK/DC,WAAY,SAAUC,GACpB,OAAoB,MAAbA,GAITC,WAAY,SAAUC,GACpB,MAAO,OAASA,EAAM,GAAK,IAAMA,EAAM,GAAK,IAAMA,EAAM,GAAK,KAG/DC,WAAY,SAAUD,GAEpB,OADYA,EAAM,GAAK,IACRV,KAAKK,oBAGtBO,QAAS,SAAUC,EAASC,GAC1B,IAAIC,EAAOF,EAAQG,WACfC,EAAQH,EAASG,MACjBC,EAAO,EACPC,EAAe,KAEnB,GAAIF,EAAO,CACTE,EAAeJ,EAAKE,GACpB,IAAIG,EAAUN,EAASM,QACnBC,EAAUP,EAASO,QACnBC,EAAeR,EAASQ,aACxBC,EAAeT,EAASS,aAExBC,EAAYV,EAASW,mBACrBC,EAAYX,EAAOY,WAAWZ,EAAKS,SAAcI,EAErD,GAAqB,OAAjBT,GAA0BK,IAAeK,MAAMH,IAA4B,IAAdA,GAC/D,OAAO,KAGJG,MAAMH,KACTP,GAAgBO,GAGF,OAAZN,GAAgC,OAAZC,GAAqC,OAAjBC,GAA0C,OAAjBC,IAEjEL,E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