trying react-map-gl version 7 rather than 8
This commit is contained in:
parent
9306790dc3
commit
5cce400de6
8 changed files with 49 additions and 52 deletions
|
|
@ -33,7 +33,7 @@ import { GeometryMapping, shapeFromCoords } from "models/GeometryMapping";
|
|||
import { FeatureCollection, Feature } from "geojson";
|
||||
import DrawController from "./mapControllers/drawController";
|
||||
//import { Geometry } from "geojson";
|
||||
import Map, { MapRef, Marker, MarkerDragEvent } from "react-map-gl/mapbox-legacy";
|
||||
import Map, { MapLayerMouseEvent, MapRef, Marker, MarkerDragEvent } from "react-map-gl";
|
||||
import { getDistanceUnit } from "utils";
|
||||
import { MapMouseEvent } from "mapbox-gl";
|
||||
import { makeStyles } from "@mui/styles";
|
||||
|
|
@ -109,7 +109,7 @@ export interface MeasurementData {
|
|||
|
||||
interface Props {
|
||||
mapTools: JSX.Element;
|
||||
mapClick(mapClickEvent: MapMouseEvent): void;
|
||||
mapClick(mapClickEvent: MapLayerMouseEvent): void;
|
||||
currentView: ViewData;
|
||||
ignoreHomeLoad?: boolean;
|
||||
defaultMapStyle?: string;
|
||||
|
|
@ -419,7 +419,7 @@ export default function MapBase(props: Props) {
|
|||
);
|
||||
};
|
||||
|
||||
const mapClick = (event: MapMouseEvent) => {
|
||||
const mapClick = (event: MapLayerMouseEvent) => {
|
||||
if (!watching) {
|
||||
props.mapClick(event);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue