{"version":3,"file":null,"sources":["C:/Development/Open Source/Leaflet.ExtraMarkers/src/assets/js/leaflet.extra-markers.js"],"sourcesContent":["export var ExtraMarkers = L.ExtraMarkers = {};\r\nExtraMarkers.version = L.ExtraMarkers.version = \"1.2.1\";\r\nExtraMarkers.Icon = L.ExtraMarkers.Icon = L.Icon.extend({\r\n options: {\r\n iconSize: [ 35, 45 ],\r\n iconAnchor: [ 17, 42 ],\r\n popupAnchor: [ 1, -32 ],\r\n shadowAnchor: [ 10, 12 ],\r\n shadowSize: [ 36, 16 ],\r\n className: \"\",\r\n prefix: \"\",\r\n extraClasses: \"\",\r\n shape: \"circle\",\r\n icon: \"\",\r\n innerHTML: \"\",\r\n markerColor: \"red\",\r\n svgBorderColor: \"#fff\",\r\n svgOpacity: 1,\r\n iconColor: \"#fff\",\r\n iconRotate: 0,\r\n number: \"\",\r\n svg: false,\r\n name: \"\"\r\n },\r\n initialize: function(options) {\r\n options = L.Util.setOptions(this, options);\r\n },\r\n createIcon: function() {\r\n var div = document.createElement(\"div\"), options = this.options;\r\n if (options.icon) {\r\n div.innerHTML = this._createInner();\r\n }\r\n if (options.innerHTML) {\r\n div.innerHTML = options.innerHTML;\r\n }\r\n if (options.bgPos) {\r\n div.style.backgroundPosition = -options.bgPos.x + \"px \" + -options.bgPos.y + \"px\";\r\n }\r\n if (!options.svg) {\r\n this._setIconStyles(div, options.shape + \"-\" + options.markerColor);\r\n } else {\r\n this._setIconStyles(div, \"svg\");\r\n }\r\n return div;\r\n },\r\n _getColorHex: function (color) {\r\n var colorMap = {\r\n red: \"#a23337\",\r\n \"orange-dark\": \"#d73e29\",\r\n orange: \"#ef9227\",\r\n yellow: \"#f5bb39\",\r\n \"blue-dark\": \"#276273\",\r\n cyan: \"#32a9dd\",\r\n purple: \"#440444\",\r\n violet: \"#90278d\",\r\n pink: \"#c057a0\",\r\n green: \"#006838\",\r\n white: \"#e8e8e8\",\r\n black: \"#211c1d\"\r\n };\r\n return colorMap[color] || color;\r\n },\r\n _createSvg: function (shape, markerColor) {\r\n var svgMap = {\r\n circle: '',\r\n square: '',\r\n star: '',\r\n penta: ''\r\n };\r\n return svgMap[shape];\r\n },\r\n _createInner: function() {\r\n var iconStyle = \"\", iconNumber = \"\", iconClass = \"\", result = \"\", options = this.options;\r\n if (options.iconColor) {\r\n iconStyle = \"color: \" + options.iconColor + \";\";\r\n }\r\n if (options.iconRotate !== 0) {\r\n iconStyle += \"-webkit-transform: rotate(\" + options.iconRotate + \"deg);\";\r\n iconStyle += \"-moz-transform: rotate(\" + options.iconRotate + \"deg);\";\r\n iconStyle += \"-o-transform: rotate(\" + options.iconRotate + \"deg);\";\r\n iconStyle += \"-ms-transform: rotate(\" + options.iconRotate + \"deg);\";\r\n iconStyle += \"transform: rotate(\" + options.iconRotate + \"deg);\";\r\n }\r\n if (options.number) {\r\n iconNumber = 'number=\"' + options.number + '\" ';\r\n }\r\n if (options.extraClasses.length) {\r\n iconClass += options.extraClasses + \" \";\r\n }\r\n if (options.prefix.length) {\r\n iconClass += options.prefix + \" \";\r\n }\r\n if (options.icon.length) {\r\n iconClass += options.icon + \" \";\r\n }\r\n if (options.svg) {\r\n result += this._createSvg(options.shape, this._getColorHex(options.markerColor));\r\n }\r\n\r\n result += '';\r\n\r\n if (options.name.length) {\r\n result += '