{"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 += '
' + options.name + '
';\r\n }\r\n\r\n return result;\r\n },\r\n _setIconStyles: function(img, name) {\r\n var options = this.options, size = L.point(options[name === \"shadow\" ? \"shadowSize\" : \"iconSize\"]), anchor, leafletName;\r\n if (name === \"shadow\") {\r\n anchor = L.point(options.shadowAnchor || options.iconAnchor);\r\n leafletName = \"shadow\";\r\n } else {\r\n anchor = L.point(options.iconAnchor);\r\n leafletName = \"icon\";\r\n }\r\n if (!anchor && size) {\r\n anchor = size.divideBy(2, true);\r\n }\r\n img.className = \"leaflet-marker-\" + leafletName + \" extra-marker extra-marker-\" + name + \" \" + options.className;\r\n if (anchor) {\r\n img.style.marginLeft = -anchor.x + \"px\";\r\n img.style.marginTop = -anchor.y + \"px\";\r\n }\r\n if (size) {\r\n img.style.width = size.x + \"px\";\r\n img.style.height = size.y + \"px\";\r\n }\r\n },\r\n createShadow: function() {\r\n var div = document.createElement(\"div\");\r\n this._setIconStyles(div, \"shadow\");\r\n return div;\r\n }\r\n});\r\nExtraMarkers.icon = L.ExtraMarkers.icon = function(options) {\r\n return new L.ExtraMarkers.Icon(options);\r\n};"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAO,QAAI,YAAY,GAAG,CAAC,CAAC,YAAY,GAAG,EAAE,CAAC;IAC9C,YAAY,CAAC,OAAO,GAAG,CAAC,CAAC,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IACxD,YAAY,CAAC,IAAI,GAAG,CAAC,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IACxD,IAAI,OAAO,EAAE;IACb,QAAQ,QAAQ,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAC5B,QAAQ,UAAU,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAC9B,QAAQ,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;IAC/B,QAAQ,YAAY,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAChC,QAAQ,UAAU,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAC9B,QAAQ,SAAS,EAAE,EAAE;IACrB,QAAQ,MAAM,EAAE,EAAE;IAClB,QAAQ,YAAY,EAAE,EAAE;IACxB,QAAQ,KAAK,EAAE,QAAQ;IACvB,QAAQ,IAAI,EAAE,EAAE;IAChB,QAAQ,SAAS,EAAE,EAAE;IACrB,QAAQ,WAAW,EAAE,KAAK;IAC1B,QAAQ,cAAc,EAAE,MAAM;IAC9B,QAAQ,UAAU,EAAE,CAAC;IACrB,QAAQ,SAAS,EAAE,MAAM;IACzB,QAAQ,UAAU,EAAE,CAAC;IACrB,QAAQ,MAAM,EAAE,EAAE;IAClB,QAAQ,GAA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