diff --git a/src/components/LeafletMap/index.js b/src/components/LeafletMap/index.js index b8f858e..0fd9c13 100644 --- a/src/components/LeafletMap/index.js +++ b/src/components/LeafletMap/index.js @@ -1,6 +1,6 @@ // it has style inside index.scss ---> // Start LeafletMap && end LeafletMap -import React, { useState, useRef, useMemo, placeholder } from "react"; +import React, { useState, useRef, useMemo } from "react"; import { MapContainer, @@ -21,14 +21,13 @@ import "leaflet-draw/dist/leaflet.draw.css"; import { EditControl } from "react-leaflet-draw"; import "leaflet-draw"; -import "./index.scss"; import * as L from "leaflet"; const bedNumb = "تخت شماره 33"; const pinMB = L.icon({ - iconUrl: placeholder, + iconUrl: "images/LeafletMapplaceholder.png", iconSize: [24, 41], iconAnchor: [0, 44], popupAnchor: [12, -40], @@ -84,7 +83,7 @@ L.drawLocal = { }, }, marker: { - icon: placeholder, + icon: "images/LeafletMapplaceholder.png", tooltip: { start: "با کلیک بر روی نقشه یک مارکر رسم کنید.", }, @@ -280,7 +279,3 @@ const LeafletMap = () => { }; export default LeafletMap; - -LeafletMap.defaultProps = { - placeholder: "images/LeafletMapplaceholder.png", -}; diff --git a/src/redux/data.js b/src/redux/data.js index 306dc7c..23ccfa4 100644 --- a/src/redux/data.js +++ b/src/redux/data.js @@ -45,6 +45,7 @@ import DistributedData from "../components/DistributedData"; import FileManager from "../components/FileManager"; import FormFields from "../components/FormFields"; import Tabels from "../components/Tabels"; +import LeafletMap from "../components/LeafletMap"; // mini components import MiniComponents from "../components/MiniComponents"; @@ -808,6 +809,16 @@ const components = [ code: null, }, }, + { + name: "LeafletMap", + author: "Andalib", + props: [], + content: { + name: "LeafletMap", + component: , + code: null, + }, + }, // mini components { name: "Mini Components",