|
|
@ -1,6 +1,6 @@ |
|
|
|
// it has style inside index.scss ---> // Start LeafletMap && end LeafletMap
|
|
|
|
// 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 { |
|
|
|
import { |
|
|
|
MapContainer, |
|
|
|
MapContainer, |
|
|
@ -21,14 +21,13 @@ import "leaflet-draw/dist/leaflet.draw.css"; |
|
|
|
import { EditControl } from "react-leaflet-draw"; |
|
|
|
import { EditControl } from "react-leaflet-draw"; |
|
|
|
|
|
|
|
|
|
|
|
import "leaflet-draw"; |
|
|
|
import "leaflet-draw"; |
|
|
|
import "./index.scss"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import * as L from "leaflet"; |
|
|
|
import * as L from "leaflet"; |
|
|
|
|
|
|
|
|
|
|
|
const bedNumb = "تخت شماره 33"; |
|
|
|
const bedNumb = "تخت شماره 33"; |
|
|
|
|
|
|
|
|
|
|
|
const pinMB = L.icon({ |
|
|
|
const pinMB = L.icon({ |
|
|
|
iconUrl: placeholder, |
|
|
|
iconUrl: "images/LeafletMapplaceholder.png", |
|
|
|
iconSize: [24, 41], |
|
|
|
iconSize: [24, 41], |
|
|
|
iconAnchor: [0, 44], |
|
|
|
iconAnchor: [0, 44], |
|
|
|
popupAnchor: [12, -40], |
|
|
|
popupAnchor: [12, -40], |
|
|
@ -84,7 +83,7 @@ L.drawLocal = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
marker: { |
|
|
|
marker: { |
|
|
|
icon: placeholder, |
|
|
|
icon: "images/LeafletMapplaceholder.png", |
|
|
|
tooltip: { |
|
|
|
tooltip: { |
|
|
|
start: "با کلیک بر روی نقشه یک مارکر رسم کنید.", |
|
|
|
start: "با کلیک بر روی نقشه یک مارکر رسم کنید.", |
|
|
|
}, |
|
|
|
}, |
|
|
@ -280,7 +279,3 @@ const LeafletMap = () => { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export default LeafletMap; |
|
|
|
export default LeafletMap; |
|
|
|
|
|
|
|
|
|
|
|
LeafletMap.defaultProps = { |
|
|
|
|
|
|
|
placeholder: "images/LeafletMapplaceholder.png", |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|