# Conflicts: # docs/RELEASE-NOTES.md # frontend/src/common/components/map/MapView.tsx # frontend/src/tabs/incidents/components/DischargeZonePanel.tsx # frontend/src/tabs/incidents/components/IncidentsView.tsx
12 lines
445 B
TypeScript
12 lines
445 B
TypeScript
import type { StyleSpecification } from 'maplibre-gl';
|
|
import { useMapStore } from '@common/store/mapStore';
|
|
import { LIGHT_STYLE, SATELLITE_3D_STYLE, ENC_EMPTY_STYLE } from '@common/components/map/mapStyles';
|
|
|
|
export function useBaseMapStyle(): StyleSpecification {
|
|
const mapToggles = useMapStore((s) => s.mapToggles);
|
|
|
|
if (mapToggles.s57) return ENC_EMPTY_STYLE;
|
|
if (mapToggles.threeD) return SATELLITE_3D_STYLE;
|
|
return LIGHT_STYLE;
|
|
}
|