update src/components/LeafletMap/index.js and data.js

master
mahdi 2 years ago
parent 7a45ac1c22
commit 1a44bd934e
  1. 11
      src/components/LeafletMap/index.js
  2. 11
      src/redux/data.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",
};

@ -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: <LeafletMap />,
code: null,
},
},
// mini components
{
name: "Mini Components",

Loading…
Cancel
Save