diff --git a/ts/components/FlyoverPoolCard.vue b/ts/components/FlyoverPoolCard.vue index cc22d31f..cfe35cc1 100644 --- a/ts/components/FlyoverPoolCard.vue +++ b/ts/components/FlyoverPoolCard.vue @@ -13,5 +13,9 @@ import { useUserStore } from "../store/user"; import MapProxiedArcgisTile from "@/components/MapProxiedArcgisTile.vue"; +interface Props { + pool: Pool; +} +const props = defineProps(); const user = useUserStore(); diff --git a/ts/components/MapProxiedArcgisTile.vue b/ts/components/MapProxiedArcgisTile.vue index 0e964b48..b76225e9 100644 --- a/ts/components/MapProxiedArcgisTile.vue +++ b/ts/components/MapProxiedArcgisTile.vue @@ -45,11 +45,11 @@ const markers = ref>(new Map()) // Watch for latitude/longitude changes watch( - () => [props.latitude, props.longitude], - ([newLat, newLng]) => { + () => [props.location], + ([newLocation]) => { if (map.value) { map.value.jumpTo({ - center: [newLng, newLat], + center: [newLocation.longitude, newLocation.latitude], zoom: 19, }); } @@ -61,7 +61,7 @@ const initializeMap = () => { try { map.value = new maplibregl.Map({ - center: [props.longitude, props.latitude], + center: [props.location.longitude, props.location.latitude], container: mapContainer.value, style: "https://tiles.stadiamaps.com/styles/osm_bright.json", zoom: 19, diff --git a/ts/components/PlanningColumnAction.vue b/ts/components/PlanningColumnAction.vue index 222daaae..5f791103 100644 --- a/ts/components/PlanningColumnAction.vue +++ b/ts/components/PlanningColumnAction.vue @@ -19,7 +19,7 @@ @@ -46,13 +47,13 @@
Lead → Field Assignment
- - -
@@ -61,11 +62,11 @@
Assignment Controls
- - + -
@@ -73,9 +74,21 @@ diff --git a/ts/components/PlanningColumnDetail.vue b/ts/components/PlanningColumnDetail.vue index 23c85fb4..20a0e0eb 100644 --- a/ts/components/PlanningColumnDetail.vue +++ b/ts/components/PlanningColumnDetail.vue @@ -70,8 +70,7 @@ :organization-id="user.organization.id" :tegola="user.urls.tegola" :url-tiles="user.urls.tile" - :latitude="selectedSignalLocation()?.latitude ?? 0.0" - :longitude="selectedSignalLocation()?.longitude ?? 0.0" + :location="selectedSignalLocation()" @map-click="updateSignalLocation" > @@ -131,10 +130,14 @@ const selectedSignalLocation = () => { } return accumulator; }, null); - return first_pool?.location; + const loc = first_pool?.location; + return loc || { + latitude: 0, + longitude: 0, + } }; const showMapTile = () => { - return props.selectedSignals.value + return selectedSignalLocation() && props.selectedSignals.value .values() .reduce( (accumulator, current) => accumulator || current.type === "flyover pool", diff --git a/ts/components/PlanningColumnDetailEntry.vue b/ts/components/PlanningColumnDetailEntry.vue index daaf2445..6ff163f2 100644 --- a/ts/components/PlanningColumnDetailEntry.vue +++ b/ts/components/PlanningColumnDetailEntry.vue @@ -1,7 +1,7 @@