You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
25 KiB

2 years ago
{"ast":null,"code":"var _jsxFileName = \"/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/LeafletMap/index.js\",\n _s = $RefreshSig$(),\n _s2 = $RefreshSig$();\n\n// it has style inside index.scss ---> // Start LeafletMap && end LeafletMap\nimport React, { useState, useRef, useMemo } from \"react\";\nimport { MapContainer, TileLayer, FeatureGroup, Rectangle, useMap, Popup, Marker, LayerGroup, ZoomControl, ScaleControl } from \"react-leaflet\";\nimport \"leaflet/dist/leaflet.css\";\nimport \"leaflet-draw/dist/leaflet.draw.css\";\nimport { EditControl } from \"react-leaflet-draw\";\nimport \"leaflet-draw\";\nimport * as L from \"leaflet\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst bedNumb = \"تخت شماره 33\";\nconst pinMB = L.icon({\n iconUrl: \"images/LeafletMapplaceholder.png\",\n iconSize: [24, 41],\n iconAnchor: [0, 44],\n popupAnchor: [12, -40],\n shadowUrl: null,\n shadowSize: null,\n shadowAnchor: null\n}); // const MyCustomMarker = L.icon({\n// iconUrl: placeholder,\n// iconSize: [24, 41],\n// iconAnchor: [0, 44],\n// popupAnchor: [12, -40],\n// shadowUrl: null,\n// shadowSize: null,\n// shadowAnchor: null,\n// });\n\nL.drawLocal = {\n draw: {\n toolbar: {\n actions: {\n title: \"لغو کردن رسم\",\n text: \"لغو\"\n },\n finish: {\n title: \"پایان رسم\",\n text: \"پایان رسم\"\n },\n undo: {\n title: \"پاک کردن آخرین نقطه رسم شده\",\n text: \"پاک کردن آخرین نقطه رسم شده\"\n },\n buttons: {\n polyline: \"موکب مورد نظر خود را رسم نمایید\",\n polygon: \"رسم پولیگان\",\n rectangle: \"رسم جای خواب\",\n circle: \"رسم دایره\",\n marker: \"رسم مارکر\",\n circlemarker: \"رسم دایره مارکر\"\n }\n },\n handlers: {\n circle: {\n tooltip: {\n start: \"کلیک کنید و سپس درگ کنید تا یک دایره بکشید.\"\n },\n radius: \"ردیوس\"\n },\n circlemarker: {\n tooltip: {\n start: \"با کلیک بر روی نقشه یک مارکر رسم کنید.\"\n }\n },\n marker: {\n icon: \"images/LeafletMapplaceholder.png\",\n tooltip: {\n start: \"با کلیک بر روی نقشه یک مارکر رسم کنید.\"\n }\n },\n polygon: {\n tooltip: {\n start: \"یک شکل رسم کنید.\",\n cont: \"ادامه رسم شکل.\",\n end: \"برای پایان رسم بر روی اولین نقظه کلیک کنید.\"\n }\n },\n polyline: {\n error: \"<strong>Error:</strong> shape edges cannot cross!\",\n tooltip: {\n start: \"با کلیک کردن یک خط رسم کنید.\",\n cont: \"با کلیک به رسم خود ادامه دهید.\",\n end: \"برای پایان رسم بر روی آخرین نقظ رسم شده کلیک کنید.\"\n }\n },\n rectangle: {\n tooltip: {\n start: \"با کلیک و درگ کردن یک جای خواب رسم کنید.\"\n }\n },\n simpleshape: {\n tooltip: {\n end: \"ماوس را رها کنید تا رسم تمام شود.\"\n }\n }\n }\n },\n edit: {\n toolbar: {\n actions: {\n save: {\n title: \"ذخیره تنظیمات\",\n text: \"ذخیره\"\n },\n cancel: {\n title: \"لغو کردن، ویرایش تمام تغییرات نادیده گرفته خواهند شد\",\n text: \"لغو\"\n },\n clearAll: {\n title: \"پاک کردن تمام لایه ها\",\n text: \"پاک کردن لایه ها\"\n }\n },\n buttons: {\n edit: \"ویرایش لایه ها\",\n editDisabled: \"لایه