From 2407f91dc45a6a4fe0d5b5f84e1464713fbe39c2 Mon Sep 17 00:00:00 2001 From: zojgame Date: Fri, 16 Feb 2024 12:25:52 +0500 Subject: [PATCH] Map error fix --- src/components/Map/MapView.tsx | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/components/Map/MapView.tsx b/src/components/Map/MapView.tsx index cb1d617..26e5bfd 100644 --- a/src/components/Map/MapView.tsx +++ b/src/components/Map/MapView.tsx @@ -1,3 +1,4 @@ +/* eslint-disable react-hooks/exhaustive-deps */ /* eslint-disable @typescript-eslint/no-explicit-any */ import { useEffect, useRef, useState } from "react"; import MapView from "@arcgis/core/views/MapView"; @@ -60,6 +61,12 @@ const createMapView = (container: HTMLDivElement) => { container: container, center: [54.67, 24.33], zoom: 15, + extent: { + xmin: 54.65, + ymin: 24.32, + xmax: 54.685, + ymax: 24.355, + }, }); view.when(disableZooming); @@ -69,14 +76,6 @@ const createMapView = (container: HTMLDivElement) => { maxZoom: 15, maxScale: 15, minScale: 15, - - geometry: { - type: "extent", - xmin: 54.65, - ymin: 24.32, - xmax: 54.685, - ymax: 24.355, - }, }; return view; @@ -124,12 +123,6 @@ export const MapViewComponent = (props: MapViewComponentProps) => { } }, [isLoading]); - // useEffect(() => { - // if (isLoading && isMobile) { - // setModal(); - // } - // }, [isMobile]); - useEffect(() => { if (!view) return; setIsLoading(true);