Remove default zoom control, add map scale.

https://github.com/dcs-liberation/dcs_liberation/issues/2039
This commit is contained in:
Dan Albert 2022-03-01 23:09:41 -08:00
parent aac333e132
commit 98c36c8b03
2 changed files with 5 additions and 3 deletions

View File

@ -1,10 +1,11 @@
import "./LiberationMap.css";
import { MapContainer, ScaleControl } from "react-leaflet";
import { BasemapLayer } from "react-esri-leaflet";
import ControlPointsLayer from "../controlpointslayer";
import FlightPlansLayer from "../flightplanslayer";
import { LatLng } from "leaflet";
import { MapContainer } from "react-leaflet";
interface GameProps {
mapCenter: LatLng;
@ -12,8 +13,9 @@ interface GameProps {
export default function LiberationMap(props: GameProps) {
return (
<MapContainer zoom={8} center={props.mapCenter}>
<MapContainer zoom={8} center={props.mapCenter} zoomControl={false}>
<BasemapLayer name="ImageryClarity" />
<ScaleControl />
<ControlPointsLayer />
<FlightPlansLayer blue={true} />
<FlightPlansLayer blue={false} />

View File

@ -1,5 +1,5 @@
import { Marker, Tooltip, useMap, useMapEvent } from "react-leaflet";
import { MutableRefObject, useCallback, useEffect, useRef } from "react";
import { MutableRefObject, useCallback, useRef } from "react";
import { Icon } from "leaflet";
import { Marker as LMarker } from "leaflet";