mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Remove default zoom control, add map scale.
https://github.com/dcs-liberation/dcs_liberation/issues/2039
This commit is contained in:
parent
aac333e132
commit
98c36c8b03
@ -1,10 +1,11 @@
|
|||||||
import "./LiberationMap.css";
|
import "./LiberationMap.css";
|
||||||
|
|
||||||
|
import { MapContainer, ScaleControl } from "react-leaflet";
|
||||||
|
|
||||||
import { BasemapLayer } from "react-esri-leaflet";
|
import { BasemapLayer } from "react-esri-leaflet";
|
||||||
import ControlPointsLayer from "../controlpointslayer";
|
import ControlPointsLayer from "../controlpointslayer";
|
||||||
import FlightPlansLayer from "../flightplanslayer";
|
import FlightPlansLayer from "../flightplanslayer";
|
||||||
import { LatLng } from "leaflet";
|
import { LatLng } from "leaflet";
|
||||||
import { MapContainer } from "react-leaflet";
|
|
||||||
|
|
||||||
interface GameProps {
|
interface GameProps {
|
||||||
mapCenter: LatLng;
|
mapCenter: LatLng;
|
||||||
@ -12,8 +13,9 @@ interface GameProps {
|
|||||||
|
|
||||||
export default function LiberationMap(props: GameProps) {
|
export default function LiberationMap(props: GameProps) {
|
||||||
return (
|
return (
|
||||||
<MapContainer zoom={8} center={props.mapCenter}>
|
<MapContainer zoom={8} center={props.mapCenter} zoomControl={false}>
|
||||||
<BasemapLayer name="ImageryClarity" />
|
<BasemapLayer name="ImageryClarity" />
|
||||||
|
<ScaleControl />
|
||||||
<ControlPointsLayer />
|
<ControlPointsLayer />
|
||||||
<FlightPlansLayer blue={true} />
|
<FlightPlansLayer blue={true} />
|
||||||
<FlightPlansLayer blue={false} />
|
<FlightPlansLayer blue={false} />
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Marker, Tooltip, useMap, useMapEvent } from "react-leaflet";
|
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 { Icon } from "leaflet";
|
||||||
import { Marker as LMarker } from "leaflet";
|
import { Marker as LMarker } from "leaflet";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user