From 0ad382fd546cdddfb1792b2eb70492b84bd15232 Mon Sep 17 00:00:00 2001 From: Gavin Rehkemper Date: Fri, 24 Jun 2022 11:12:41 -0500 Subject: [PATCH] build 3.0.0 --- dist/esri-leaflet-renderers-debug.js | 1210 ++++++++++++++++++++++ dist/esri-leaflet-renderers-debug.js.map | 1 + dist/esri-leaflet-renderers.js | 5 + dist/esri-leaflet-renderers.js.map | 1 + dist/siteData.json | 1 + 5 files changed, 1218 insertions(+) create mode 100644 dist/esri-leaflet-renderers-debug.js create mode 100644 dist/esri-leaflet-renderers-debug.js.map create mode 100644 dist/esri-leaflet-renderers.js create mode 100644 dist/esri-leaflet-renderers.js.map create mode 100644 dist/siteData.json diff --git a/dist/esri-leaflet-renderers-debug.js b/dist/esri-leaflet-renderers-debug.js new file mode 100644 index 0000000..7f2b634 --- /dev/null +++ b/dist/esri-leaflet-renderers-debug.js @@ -0,0 +1,1210 @@ +/* esri-leaflet-renderers - v3.0.0 - Fri Jun 24 2022 11:11:48 GMT-0500 (Central Daylight Time) + * Copyright (c) 2022 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 = typeof globalThis !== 'undefined' ? globalThis : 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'; + + function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + + function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n["default"] = e; + return Object.freeze(n); + } + + var L__default = /*#__PURE__*/_interopDefaultLegacy(L); + var EsriLeaflet__namespace = /*#__PURE__*/_interopNamespace(EsriLeaflet); + var EsriLeafletCluster__default = /*#__PURE__*/_interopDefaultLegacy(EsriLeafletCluster); + + 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["default"].Path.extend({ + + initialize: function (latlng, size, options) { + L__default["default"].setOptions(this, options); + this._size = size; + this._latlng = L__default["default"].latLng(latlng); + this._svgCanvasIncludes(); + }, + + toGeoJSON: function () { + return L__default["default"].GeoJSON.getFeature(this, { + type: 'Point', + coordinates: L__default["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["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["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["default"].SVG.include({ + _updateCrossMarker: function (layer) { + var latlng = layer._point; + var offset = layer._size / 2.0; + + if (L__default["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["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["default"].SVG.include({ + _updateXMarker: function (layer) { + var latlng = layer._point; + var offset = layer._size / 2.0; + + if (L__default["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["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["default"].SVG.include({ + _updateSquareMarker: function (layer) { + var latlng = layer._point; + var offset = layer._size / 2.0; + + if (L__default["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["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["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["default"].SVG.include({ + _updateDiamondMarker: function (layer) { + var latlng = layer._point; + var offset = layer._size / 2.0; + + if (L__default["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["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 (Object.prototype.hasOwnProperty.call(styles, attr)) { + mergedStyles[attr] = styles[attr]; + } + } + // override with user defined style attributes + if (userStyles) { + for (attr in userStyles) { + if (Object.prototype.hasOwnProperty.call(userStyles, attr)) { + mergedStyles[attr] = userStyles[attr]; + } + } + } + return mergedStyles; + } + }); + + 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); + } + + 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); + } + + 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__namespace.FeatureLayer.addInitHook(wireUpRenderers); + + if (typeof EsriLeafletCluster__default["default"] !== 'undefined' && EsriLeafletCluster.FeatureLayer) { + EsriLeafletCluster.FeatureLayer.addInitHook(wireUpRenderers); + } + + var version = "3.0.0"; + + 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..10b10d3 --- /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/ClassBreaksRenderer.js","../src/Renderers/UniqueValueRenderer.js","../src/Renderers/SimpleRenderer.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 (Object.prototype.hasOwnProperty.call(styles, 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 (Object.prototype.hasOwnProperty.call(userStyles, 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 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 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 { Util, GeoJSON, geoJson } from 'leaflet';\r\nimport * as EsriLeaflet from 'esri-leaflet';\r\nimport EsriLeafletCluster, { FeatureLayer as EsriLeafletClusterFeatureLayer } 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' && EsriLeafletClusterFeatureLayer) {\r\n EsriLeafletClusterFeatureLayer.addInitHook(wireUpRenderers);\r\n}\r\n"],"names":["Class","L","leafletIcon","extend","marker","circleMarker","Util","geoJson","GeoJSON","EsriLeaflet","EsriLeafletCluster","EsriLeafletClusterFeatureLayer"],"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,OAAO,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC;EAC3C,GAAG;AACH;EACA,EAAE,OAAO,EAAE,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E,OAAO,CAAC,CAAC;EACrD,KAAK;EACL,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;EACnC,GAAG,CAAC;EACJ,CAAC;AACD;AACAC,wBAAW,CAAC,YAAY,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AACtD;EACA,IAAI,OAAOC,sCAAkB,KAAK,WAAW,IAAIC,+BAA8B,EAAE;EACjF,EAAEA,+BAA8B,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;EAC9D;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ 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..91c67cf --- /dev/null +++ b/dist/esri-leaflet-renderers.js @@ -0,0 +1,5 @@ +/* esri-leaflet-renderers - v3.0.0 - Fri Jun 24 2022 11:11:49 GMT-0500 (Central Daylight Time) + * Copyright (c) 2022 Environmental Systems Research Institute, Inc. + * Apache-2.0 */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("leaflet"),require("esri-leaflet"),require("esri-leaflet-cluster")):"function"==typeof define&&define.amd?define(["exports","leaflet","esri-leaflet","esri-leaflet-cluster"],e):e(((t="undefined"!=typeof globalThis?globalThis: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,e,i,s){"use strict";function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function n(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(i){if("default"!==i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}})),e.default=t,Object.freeze(e)}var r=o(e),l=n(i),a=o(s),h=e.Class.extend({initialize:function(t,e){this._symbolJson=t,this.val=null,this._styles={},this._isDefault=!1,this._layerTransparency=1,e&&e.layerTransparency&&(this._layerTransparency=1-e.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,e){var i=t.properties,s=e.field,o=0,n=null;if(s){n=i[s];var r=e.minSize,l=e.maxSize,a=e.minDataValue,h=e.maxDataValue,u=e.normalizationField,y=i?parseFloat(i[u]):void 0;if(null===n||u&&(isNaN(y)||0===y))return null;isNaN(y)||(n/=y),null!==r&&null!==l&&null!==a&&null!==h&&(o=n<=a?r:n>=h?l:r+(n-a)/(h-a)*(l-r)),o=isNaN(o)?0:o}return o},getColor:function(t,e){if(!(t.properties&&e&&e.field&&e.stops))return null;var i,s,o,n,r=t.properties,l=r[e.field],a=e.normalizationField,h=r?parseFloat(r[a]):void 0;if(null===l||a&&(isNaN(h)||0===h))return null;if(isNaN(h)||(l/=h),l<=e.stops[0].value)return e.stops[0].color;var u=e.stops[e.stops.length-1];if(l>=u.value)return u.color;for(var y=0;yl){s=f.color,n=f.value;break}}if(!isNaN(o)&&!isNaN(n)){var _=n-o;if(_>0){var c=(l-o)/_;if(c){var p=(n-l)/_;if(p){for(var d=[],S=0;S<4;S++)d[S]=Math.round(i[S]*p+s[S]*c);return d}return s}return i}}return null}}),u=r.default.Path.extend({initialize:function(t,e,i){r.default.setOptions(this,i),this._size=e,this._latlng=r.default.latLng(t),this._svgCanvasIncludes()},toGeoJSON:function(){return r.default.GeoJSON.getFeature(this,{type:"Point",coordinates:r.default.GeoJSON.latLngToCoords(this.getLatLng())})},_svgCanvasIncludes:function(){},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&this._updatePath()},_updatePath:function(){},setLatLng:function(t){return this._latlng=r.default.latLng(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setSize:function(t){return this._size=t,this.redraw()},getSize:function(){return this._size}}),y=u.extend({initialize:function(t,e,i){u.prototype.initialize.call(this,t,e,i)},_updatePath:function(){this._renderer._updateCrossMarker(this)},_svgCanvasIncludes:function(){r.default.Canvas.include({_updateCrossMarker:function(t){var e=t._point,i=t._size/2,s=this._ctx;s.beginPath(),s.moveTo(e.x,e.y+i),s.lineTo(e.x,e.y-i),this._fillStroke(s,t),s.moveTo(e.x-i,e.y),s.lineTo(e.x+i,e.y),this._fillStroke(s,t)}}),r.default.SVG.include({_updateCrossMarker:function(t){var e=t._point,i=t._size/2;r.default.Browser.vml&&(e._round(),i=Math.round(i));var s="M"+e.x+","+(e.y+i)+"L"+e.x+","+(e.y-i)+"M"+(e.x-i)+","+e.y+"L"+(e.x+i)+","+e.y;this._setPath(t,s)}})}}),f=u.extend({initialize:function(t,e,i){u.prototype.initialize.call(this,t,e,i)},_updatePath:function(){this._renderer._updateXMarker(this)},_svgCanvasIncludes:function(){r.default.Canvas.include({_updateXMarker:function(t){var e=t._point,i=t._size/2,s=this._ctx;s.beginPath(),s.moveTo(e.x+i,e.y+i),s.lineTo(e.x-i,e.y-i),this._fillStroke(s,t)}}),r.default.SVG.include({_updateXMarker:function(t){var e=t._point,i=t._size/2;r.default.Browser.vml&&(e._round(),i=Math.round(i));var s="M"+(e.x+i)+","+(e.y+i)+"L"+(e.x-i)+","+(e.y-i)+"M"+(e.x-i)+","+(e.y+i)+"L"+(e.x+i)+","+(e.y-i);this._setPath(t,s)}})}}),_=u.extend({options:{fill:!0},initialize:function(t,e,i){u.prototype.initialize.call(this,t,e,i)},_updatePath:function(){this._renderer._updateSquareMarker(this)},_svgCanvasIncludes:function(){r.default.Canvas.include({_updateSquareMarker:function(t){var e=t._point,i=t._size/2,s=this._ctx;s.beginPath(),s.moveTo(e.x+i,e.y+i),s.lineTo(e.x-i,e.y+i),s.lineTo(e.x-i,e.y-i),s.lineTo(e.x+i,e.y-i),s.closePath(),this._fillStroke(s,t)}}),r.default.SVG.include({_updateSquareMarker:function(t){var e=t._point,i=t._size/2;r.default.Browser.vml&&(e._round(),i=Math.round(i));var s="M"+(e.x+i)+","+(e.y+i)+"L"+(e.x-i)+","+(e.y+i)+"L"+(e.x-i)+","+(e.y-i)+"L"+(e.x+i)+","+(e.y-i);s+=r.default.Browser.svg?"z":"x",this._setPath(t,s)}})}}),c=u.extend({options:{fill:!0},initialize:function(t,e,i){u.prototype.initialize.call(this,t,e,i)},_updatePath:function(){this._renderer._updateDiamondMarker(this)},_svgCanvasIncludes:function(){r.default.Canvas.include({_updateDiamondMarker:function(t){var e=t._point,i=t._size/2,s=this._ctx;s.beginPath(),s.moveTo(e.x,e.y+i),s.lineTo(e.x-i,e.y),s.lineTo(e.x,e.y-i),s.lineTo(e.x+i,e.y),s.closePath(),this._fillStroke(s,t)}}),r.default.SVG.include({_updateDiamondMarker:function(t){var e=t._point,i=t._size/2;r.default.Browser.vml&&(e._round(),i=Math.round(i));var s="M"+e.x+","+(e.y+i)+"L"+(e.x-i)+","+e.y+"L"+e.x+","+(e.y-i)+"L"+(e.x+i)+","+e.y;s+=r.default.Browser.svg?"z":"x",this._setPath(t,s)}})}}),p=h.extend({statics:{MARKERTYPES:["esriSMSCircle","esriSMSCross","esriSMSDiamond","esriSMSSquare","esriSMSX","esriPMS"]},initialize:function(t,e){var i;if(h.prototype.initialize.call(this,t,e),e&&(this.serviceUrl=e.url),t)if("esriPMS"===t.type){var s=this._symbolJson.url;s&&"http://"===s.substr(0,7)||"https://"===s.substr(0,8)?(i=this.sanitize(s),this._iconUrl=i):(i=this.serviceUrl+"images/"+s,this._iconUrl=e&&e.token?i+"?token="+e.token:i),t.imageData&&(this._iconUrl="data:"+t.contentType+";base64,"+t.imageData),this._icons={},this.icon=this._createIcon(this._symbolJson)}else this._fillStyles()},sanitize:function(t){if(!t)return"";var e;try{e=(e=(e=(e=t.replace(/
/gi,"\n")).replace(//gi,"\n")).replace(/(.*?)<\/a>/gi," $2 ($1) ")).replace(/<(?:.|\s)*?>/g,"")}catch(t){e=null}return e},_fillStyles:function(){this._symbolJson.outline&&this._symbolJson.size>0&&"esriSLSNull"!==this._symbolJson.outline.style?(this._styles.stroke=!0,this._styles.weight=this.pixelValue(this._symbolJson.outline.width),this._styles.color=this.colorValue(this._symbolJson.outline.color),this._styles.opacity=this.alphaValue(this._symbolJson.outline.color)):this._styles.stroke=!1,this._symbolJson.color?(this._styles.fillColor=this.colorValue(this._symbolJson.color),this._styles.fillOpacity=this.alphaValue(this._symbolJson.color)):this._styles.fillOpacity=0,"esriSMSCircle"===this._symbolJson.style&&(this._styles.radius=this.pixelValue(this._symbolJson.size)/2)},_createIcon:function(t){var i=this.pixelValue(t.width),s=i;t.height&&(s=this.pixelValue(t.height));var o=i/2,n=s/2;t.xoffset&&(o+=this.pixelValue(t.xoffset)),t.yoffset&&(n+=this.pixelValue(t.yoffset));var r=e.icon({iconUrl:this._iconUrl,iconSize:[i,s],iconAnchor:[o,n]});return this._icons[t.width.toString()]=r,r},_getIcon:function(t){var e=this._icons[t.toString()];return e||(e=this._createIcon({width:t})),e},pointToLayer:function(t,i,s,o){var n=this._symbolJson.size||this._symbolJson.width;if(!this._isDefault){if(s.sizeInfo){var r=this.getSize(t,s.sizeInfo);r&&(n=r)}if(s.colorInfo){var l=this.getColor(t,s.colorInfo);l&&(this._styles.fillColor=this.colorValue(l),this._styles.fillOpacity=this.alphaValue(l))}}if("esriPMS"===this._symbolJson.type){var a=e.extend({},{icon:this._getIcon(n)},o);return e.marker(i,a)}switch(n=this.pixelValue(n),this._symbolJson.style){case"esriSMSSquare":return function(t,e,i){return new _(t,e,i)}(i,n,e.extend({},this._styles,o));case"esriSMSDiamond":return function(t,e,i){return new c(t,e,i)}(i,n,e.extend({},this._styles,o));case"esriSMSCross":return function(t,e,i){return new y(t,e,i)}(i,n,e.extend({},this._styles,o));case"esriSMSX":return function(t,e,i){return new f(t,e,i)}(i,n,e.extend({},this._styles,o))}return this._styles.radius=n/2,e.circleMarker(i,e.extend({},this._styles,o))}});function d(t,e){return new p(t,e)}var S=h.extend({statics:{LINETYPES:["esriSLSDash","esriSLSDot","esriSLSDashDotDot","esriSLSDashDot","esriSLSSolid"]},initialize:function(t,e){h.prototype.initialize.call(this,t,e),this._fillStyles()},_fillStyles:function(){if(this._styles.lineCap="butt",this._styles.lineJoin="miter",this._styles.fill=!1,this._styles.weight=0,!this._symbolJson)return this._styles;if(this._symbolJson.color&&(this._styles.color=this.colorValue(this._symbolJson.color),this._styles.opacity=this.alphaValue(this._symbolJson.color)),!isNaN(this._symbolJson.width)){this._styles.weight=this.pixelValue(this._symbolJson.width);var t=[];switch(this._symbolJson.style){case"esriSLSDash":t=[4,3];break;case"esriSLSDot":t=[1,3];break;case"esriSLSDashDot":t=[8,3,1,3];break;case"esriSLSDashDotDot":t=[8,3,1,3,1,3]}if(t.length>0){for(var e=0;e=0)?(this._styles.fill=!0,this._styles.fillColor=this.colorValue(this._symbolJson.color),this._styles.fillOpacity=this.alphaValue(this._symbolJson.color)):(this._styles.fill=!1,this._styles.fillOpacity=0))},style:function(t,e){if(!this._isDefault&&e&&e.colorInfo){var i=this.getColor(t,e.colorInfo);i&&(this._styles.fillColor=this.colorValue(i),this._styles.fillOpacity=this.alphaValue(i))}return this._styles}});function v(t,e){return new b(t,e)}var g=e.Class.extend({options:{proportionalPolygon:!1,clickable:!0},initialize:function(t,i){this._rendererJson=t,this._pointSymbols=!1,this._symbols=[],this._visualVariables=this._parseVisualVariables(t.visualVariables),e.Util.setOptions(this,i)},_parseVisualVariables:function(t){var e={};if(t)for(var i=0;i=0;i--)(t=this.options.proportionalPolygon&&this._rendererJson.backgroundFillSymbol?this._newSymbol(this._rendererJson.backgroundFillSymbol):this._newSymbol(e[i].symbol)).val=e[i].classMaxValue,this._symbols.push(t);this._symbols.sort((function(t,e){return t.val>e.val?1:-1})),this._createDefaultSymbol(),this._maxValue=this._symbols[this._symbols.length-1].val},_getSymbol:function(t){var e=t.properties[this._field];if(this._normalizationField){var i=t.properties[this._normalizationField];if(isNaN(i)||0===i)return this._defaultSymbol;e/=i}if(e>this._maxValue)return this._defaultSymbol;for(var s=this._symbols[0],o=this._symbols.length-1;o>=0&&!(e>this._symbols[o].val);o--)s=this._symbols[o];return s}});function x(t,e){return new L(t,e)}var P=g.extend({initialize:function(t,e){g.prototype.initialize.call(this,t,e),this._field=this._rendererJson.field1,this._createSymbols()},_createSymbols:function(){for(var t,e=this._rendererJson.uniqueValueInfos,i=e.length-1;i>=0;i--)(t=this._newSymbol(e[i].symbol)).val=e[i].value,this._symbols.push(t);this._createDefaultSymbol()},_getSymbol:function(t){var e=t.properties[this._field];if(this._rendererJson.fieldDelimiter&&this._rendererJson.field2){var i=t.properties[this._rendererJson.field2];if(i){e+=this._rendererJson.fieldDelimiter+i;var s=t.properties[this._rendererJson.field3];s&&(e+=this._rendererJson.fieldDelimiter+s)}}for(var o=this._defaultSymbol,n=this._symbols.length-1;n>=0;n--)this._symbols[n].val==e&&(o=this._symbols[n]);return o}});function z(t,e){return new P(t,e)}var J=g.extend({initialize:function(t,e){g.prototype.initialize.call(this,t,e),this._createSymbol()},_createSymbol:function(){this._rendererJson.symbol&&this._symbols.push(this._newSymbol(this._rendererJson.symbol))},_getSymbol:function(){return this._symbols[0]}});function w(t,e){return new J(t,e)}function k(){if(!this.options.ignoreRenderer){var t=e.Util.bind(this.onAdd,this),i=e.Util.bind(this.unbindPopup,this),s=e.Util.bind(this.onRemove,this);e.Util.bind(this.createNewLayer,this),this.onAdd=function(e){this.metadata((function(i,s){i?console.warn("failed to load metadata from the service."):s&&s.drawingInfo&&(this.options.drawingInfo&&(s.drawingInfo=this.options.drawingInfo),"overlayPane"===this.options.pane&&"esriGeometryPoint"===s.geometryType&&(this.options.pane="markerPane"),this._setRenderers(s),t(e),this._addPointLayer(e))}),this)},this.onRemove=function(t){if(s(t),this._pointLayer){var e=this._pointLayer.getLayers();for(var i in e)t.removeLayer(e[i])}},this.unbindPopup=function(){if(i(),this._pointLayer){var t=this._pointLayer.getLayers();for(var e in t)t[e].unbindPopup()}},this._addPointLayer=function(t){this._pointLayer&&(this._pointLayer.addTo(t),this._pointLayer.bringToFront())},this._createPointLayer=function(){if(!this._pointLayer&&(this._pointLayer=e.geoJson(),this._pointLayerIds={},this._popup)){this._pointLayer.options.onEachFeature=e.Util.bind((function(t,e){e.bindPopup(this._popup(t,e),this._popupOptions)}),this)}},this.createNewLayer=function(t){var i=e.GeoJSON.geometryToLayer(t,this.options);if(this._hasProportionalSymbols){var s=this.getPolygonCentroid(t.geometry.coordinates);if(!isNaN(s[0])&&!isNaN(s[0])){this._createPointLayer();var o=t.id.toString();if(!this._pointLayerIds[o]){var n=this.getPointJson(t,s);this._pointLayer.addData(n),this._pointLayerIds[o]=!0}this._pointLayer.bringToFront()}}return i},this.getPolygonCentroid=function(t){var e=t[0][0];2===e.length&&(e=t[0]);for(var i,s,o,n=0,r=0,l=0,a=e.length,h=0,u=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 (Object.prototype.hasOwnProperty.call(styles, 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 (Object.prototype.hasOwnProperty.call(userStyles, 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 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 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 { Util, GeoJSON, geoJson } from 'leaflet';\r\nimport * as EsriLeaflet from 'esri-leaflet';\r\nimport EsriLeafletCluster, { FeatureLayer as EsriLeafletClusterFeatureLayer } 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' && EsriLeafletClusterFeatureLayer) {\r\n EsriLeafletClusterFeatureLayer.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","serviceUrl","imageUrl","substr","sanitize","_iconUrl","token","imageData","contentType","_icons","icon","_createIcon","_fillStyles","text","replace","ex","outline","style","stroke","weight","width","opacity","fillColor","fillOpacity","radius","height","xOffset","yOffset","xoffset","yoffset","leafletIcon","iconUrl","iconSize","iconAnchor","toString","_getIcon","pointToLayer","geojson","visualVariables","calculatedSize","layerOptions","marker","squareMarker","diamondMarker","crossMarker","xMarker","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","Object","hasOwnProperty","ClassBreaksRenderer","_field","normalizationType","_normalizationField","_createSymbols","symbol","classbreaks","classBreakInfos","backgroundFillSymbol","classMaxValue","push","sort","a","b","_maxValue","classBreaksRenderer","UniqueValueRenderer","field1","uniques","uniqueValueInfos","fieldDelimiter","field2","val2","val3","field3","uniqueValueRenderer","SimpleRenderer","_createSymbol","simpleRenderer","wireUpRenderers","ignoreRenderer","oldOnAdd","onAdd","oldUnbindPopup","unbindPopup","oldOnRemove","onRemove","createNewLayer","map","metadata","error","response","console","warn","drawingInfo","pane","geometryType","_setRenderers","_addPointLayer","_pointLayer","pointLayers","getLayers","removeLayer","addTo","bringToFront","_createPointLayer","geoJson","_pointLayerIds","_popup","onEachFeature","bindPopup","_popupOptions","fLayer","geometryToLayer","_hasProportionalSymbols","centroid","getPolygonCentroid","geometry","featureId","id","pointjson","getPointJson","addData","pts","p1","p2","f","twicearea","nPts","_checkForProportionalSymbols","renderer","serviceInfo","rend","rendererInfo","transparency","FeatureLayer","addInitHook","EsriLeafletCluster","EsriLeafletClusterFeatureLayer"],"mappings":";;;2zBAEWA,EAASC,QAAMC,OAAO,CAC/BC,WAAY,SAAUC,EAAYC,GAChCC,KAAKC,YAAcH,EACnBE,KAAKE,IAAM,KAC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,GAE1D,GADAvR,KAAKuQ,yBAA0B,EACV,wBAAjBlB,IACEkC,EAASxE,uBACX/M,KAAKuQ,yBAA0B,GAG7BgB,EAASzE,iBAAmByE,EAASzE,gBAAgBvK,QAAQ,CAC/D,IAAIwJ,EAAMwF,EAASzE,gBAAgB,GAAGF,QAClCb,GAAqB,YAAbA,EAAIlI,MAAmC,YAAbkI,EAAIlI,OACxC7D,KAAKuQ,yBAA0B,KAMvCvQ,KAAKsP,cAAgB,SAAUkC,GAC7B,IAAIC,EACAC,EAAeF,EAAYrC,YAAYoC,SAEvCxR,EAAU,CACZ+G,IAAK9G,KAAKD,QAAQ+G,KAmBpB,OAhBI9G,KAAKD,QAAQqH,QACfrH,EAAQqH,MAAQpH,KAAKD,QAAQqH,OAG3BpH,KAAKD,QAAQqP,OACfrP,EAAQqP,KAAOpP,KAAKD,QAAQqP,MAG1BoC,EAAYrC,YAAYwC,eAC1B5R,EAAQO,kBAAoBkR,EAAYrC,YAAYwC,cAGlD3R,KAAKD,QAAQgI,QACfhI,EAAQkM,iBAAmBjM,KAAKD,QAAQgI,OAGlC2J,EAAa7N,MACnB,IAAK,cAEH,GADA7D,KAAKsR,6BAA6BE,EAAYnC,aAAcqC,GACxD1R,KAAKuQ,wBACPvQ,KAAK8P,oBACOxC,EAAoBoE,EAAc3R,GACxC6L,oBAAoB5L,KAAKwP,aAC/BzP,EAAQ8K,qBAAsB,EAEhC4G,EAAOnE,EAAoBoE,EAAc3R,GACzC,MACF,IAAK,cACH0R,EAAOzD,EAAoB0D,EAAc3R,GACzC,MACF,QACE0R,EAAOtD,EAAeuD,EAAc3R,GAExC0R,EAAK7F,oBAAoB5L,UAIjB4R,aAAaC,YAAYzD,QAEH,IAAvB0D,WAAsCC,gBAC/CA,eAA+BF,YAAYzD"} \ No newline at end of file diff --git a/dist/siteData.json b/dist/siteData.json new file mode 100644 index 0000000..0400d28 --- /dev/null +++ b/dist/siteData.json @@ -0,0 +1 @@ +{"name": "esri-leaflet-renderers","version": "3.0.0","lib": {"path": "dist/esri-leaflet-renderers.js","integrity": "sha512-tqY7QUz7UHKLqhBX1SVYBsn6EKeadkSqYXsdj3RbzZdY8jUq1t0Hi+CS7vylbMIM/jcmN4PgelBhiKvCjTJ7GQ=="}}