update
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
import { useRef } from "react";
|
||||
import { Marker, useMapEvents } from "react-leaflet";
|
||||
|
||||
const prefix = process.env.NODE_ENV === "production" ? "/v3" : "";
|
||||
|
||||
const locationMarker = L.icon({
|
||||
iconUrl: prefix + "/images/locationMarker.png",
|
||||
iconSize: [50, 50],
|
||||
iconAnchor: [25, 50],
|
||||
});
|
||||
|
||||
const MarkerLocation = ({ setValue }) => {
|
||||
const location = useRef();
|
||||
const map = useMapEvents({
|
||||
move: (e) => {
|
||||
const latlon = e.target.getCenter()
|
||||
location.current?.setLatLng(latlon);
|
||||
setValue('lat', latlon.lat)
|
||||
setValue('lon', latlon.lng)
|
||||
},
|
||||
zoom: (e) => {
|
||||
const latlon = e.target.getCenter()
|
||||
location.current?.setLatLng(latlon);
|
||||
setValue('lat', latlon.lat)
|
||||
setValue('lon', latlon.lng)
|
||||
},
|
||||
});
|
||||
return (
|
||||
<Marker ref={location} icon={locationMarker} position={map.getCenter()} key="location" />
|
||||
)
|
||||
}
|
||||
export default MarkerLocation
|
||||
@@ -1,7 +1,5 @@
|
||||
const api = process.env.NEXT_PUBLIC_API_URL;
|
||||
|
||||
export const GET_CSRF = api + "/csrf";
|
||||
|
||||
export const GET_USER_ROUTE = api + "/webapi/user/get-permission";
|
||||
export const GET_LOGIN_ROUTE = api + "/login_dev";
|
||||
export const GET_INQUIRY_PRIVACY_FENCING_ROUTE = api + "/api/v3/harim/divarkeshi";
|
||||
|
||||
Reference in New Issue
Block a user