Create option to use satellite imagery

Useful for looking at pools
This commit is contained in:
Eli Ribble 2026-04-16 02:47:11 +00:00
parent 82dd5e8683
commit aa5a35b15f
No known key found for this signature in database

View file

@ -180,10 +180,12 @@ interface Props {
initialCamera?: Camera;
modelValue: Camera;
markers?: Marker[];
useSatellite?: boolean;
}
const props = withDefaults(defineProps<Props>(), {
markers: () => [],
useSatellite: false,
});
const emit = defineEmits<Emits>();
@ -227,9 +229,13 @@ function deactivateMap() {
function initializeMap() {
if (!mapContainer.value) return;
let style = "https://tiles.stadiamaps.com/styles/alidade_smooth.json";
if (props.useSatellite) {
style = "https://tiles.stadiamaps.com/styles/alidade_satellite.json";
}
const _map = new maplibregl.Map({
container: mapContainer.value,
style: "https://tiles.stadiamaps.com/styles/alidade_smooth.json",
style: style,
// Disable interactions by default
doubleClickZoom: false,
dragPan: false,