Skip to content

Commit

Permalink
puts in popout buttons for cyclomedia and eagleview
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrothwell committed Oct 8, 2024
1 parent 14bb1b5 commit c759f96
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/assets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ a {

.map-panel-holder {
width: 50%;
flex-grow: 1;
height: calc(100vh - 110px);
margin-bottom: 0px;
}

Expand Down Expand Up @@ -114,8 +114,7 @@ a {
}

.map-panel.cyclomedia-eagleview {
// height: 51.5%;
height: 52.5%;
height: 50%;
}

.map-class {
Expand Down
33 changes: 31 additions & 2 deletions src/components/map/CyclomediaPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const projection2272 = "+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333
const cyclomediaInitialized = ref(false);
const $emit = defineEmits(['updateCameraYaw', 'updateCameraLngLat', 'updateCameraHFov']);
const $emit = defineEmits(['updateCameraYaw', 'updateCameraLngLat', 'updateCameraHFov', 'toggleCyclomedia']);
watch(
() => MapStore.currentAddressCoords,
Expand Down Expand Up @@ -152,25 +152,54 @@ onMounted( async() => {
}
})
const popoutClicked = () => {
window.open('//cyclomedia.phila.gov/?lat=' + MapStore.cyclomediaCameraLngLat[1] + '&lng=' + MapStore.cyclomediaCameraLngLat[0], '_blank');
$emit('toggleCyclomedia');
}
</script>
<template>
<div class="cyclomedia-panel">
<div class="cyclomedia-pop-out">
<font-awesome-icon
icon="fa-external-link-alt"
@click="popoutClicked"
></font-awesome-icon>
</div>
<div
id="cycloviewer"
ref="cycloviewer"
class="panoramaViewerWindow"
/>
>
</div>
</div>
</template>
<style scoped>
.cyclomedia-panel {
position: relative;
height: 100%;
width: 100%;
}
.cyclomedia-pop-out {
position: absolute;
right: 0;
z-index: 2;
background-color: white;
padding-left: 6px;
padding-right: 6px;
padding-top: 1px;
padding-bottom: 1px;
cursor: pointer;
border-radius: 2px;
}
@media
only screen and (max-width: 768px),
Expand Down
45 changes: 41 additions & 4 deletions src/components/map/EagleviewPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { useMapStore } from '@/stores/MapStore';
// import { config } from 'maplibre-gl';
const MapStore = useMapStore();
const $emit = defineEmits(['toggleEagleview']);
const clientId = import.meta.env.VITE_EAGLEVIEW_CLIENT_ID;
const clientSecret = import.meta.env.VITE_EAGLEVIEW_CLIENT_SECRET;
const options = {
Expand Down Expand Up @@ -90,23 +92,58 @@ onMounted( async() => {
// });
});
const popoutClicked = () => {
window.open('//pictometry.phila.gov/?lat=' + MapStore.currentAddressCoords[1] + '&lng=' + MapStore.currentAddressCoords[0], '_blank');
$emit('toggleEagleview');
}
</script>
<template>
<div
id="eagleview"
class="eagleview-div"
/>
<div class="eagleview-panel">
<div class="eagleview-pop-out">
<font-awesome-icon
icon="fa-external-link-alt"
@click="popoutClicked"
></font-awesome-icon>
</div>
<div
id="eagleview"
class="eagleview-div"
/>
</div>
</template>
<style>
.eagleview-panel {
position: relative;
height: 100%;
width: 100%;
}
.eagleview-div {
position: relative;
height: 100%;
width: 100%;
}
.eagleview-pop-out {
position: absolute;
right: 0;
z-index: 2;
background-color: white;
padding-left: 6px;
padding-right: 6px;
padding-top: 1px;
padding-bottom: 1px;
cursor: pointer;
border-radius: 2px;
}
@media
only screen and (max-width: 768px),
(min-device-width: 768px) and (max-device-width: 1024px) {
Expand Down
2 changes: 2 additions & 0 deletions src/components/map/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1050,11 +1050,13 @@ const toggleEagleview = () => {
@update-camera-yaw="updateCyclomediaCameraAngle"
@update-camera-h-fov="updateCyclomediaCameraViewcone"
@update-camera-lng-lat="updateCyclomediaCameraLngLat"
@toggle-cyclomedia="toggleCyclomedia"
/>
</KeepAlive>
<KeepAlive>
<EagleviewPanel
v-if="MapStore.eagleviewOn"
@toggle-eagleview="toggleEagleview"
/>
</KeepAlive>
</template>
Expand Down

0 comments on commit c759f96

Please sign in to comment.