1414 v-if =" props .activeSource === ' osm' || props .activeSource === ' overture' || props .activeSource === ' conflated' "
1515 />
1616
17+ <!-- Overture's archive is z14-only; below the under-zoom floor we prompt
18+ the user to zoom in rather than showing an empty map. -->
19+ <div v-if =" showOvertureZoomHint" class =" overture-zoom-hint" >
20+ <span class =" material-symbols-outlined" >zoom_in</span >
21+ Zoom in to see Overture POIs
22+ </div >
23+
1724 <!-- Desktop: native select -->
1825 <div class =" basemap-switcher basemap-switcher-desktop" >
1926 <select v-model =" selectedStyle" @change =" switchBaseMap" >
6067
6168<script setup>
6269import {
63- ref , shallowRef , watch , onMounted , onBeforeUnmount , nextTick ,
70+ ref , shallowRef , computed , watch , onMounted , onBeforeUnmount , nextTick ,
6471} from ' vue'
6572import Map from ' ol/Map'
6673import View from ' ol/View'
@@ -80,6 +87,7 @@ import {
8087 getOvertureLayer ,
8188 updateOvertureFilters ,
8289 wrapOvertureFeature ,
90+ OVERTURE_MIN_ZOOM ,
8391} from ' ../layers/overtureLayer.js'
8492import {
8593 getConflatedLayer ,
@@ -105,6 +113,13 @@ const popupEl = ref(null)
105113const map = shallowRef (null )
106114const popupOverlay = shallowRef (null )
107115const selectedFeature = shallowRef (null )
116+ const currentZoom = ref (INITIAL_ZOOM )
117+
118+ // Overture is z14-only and only renders above OVERTURE_MIN_ZOOM (see
119+ // overtureLayer.js); below the floor, prompt the user to zoom in.
120+ const showOvertureZoomHint = computed (
121+ () => props .activeSource === ' overture' && currentZoom .value <= OVERTURE_MIN_ZOOM
122+ )
108123const selectedStyle = ref (' positron' )
109124const basemapModalOpen = ref (false )
110125const baseMapStyles = BASE_MAP_STYLES
@@ -165,6 +180,10 @@ onMounted(async () => {
165180
166181 useMapHash (olMap)
167182 if (! hashState) handleGeolocate ()
183+
184+ // Track view zoom so the Overture "zoom in" hint can react to it.
185+ currentZoom .value = view .getZoom ()
186+ view .on (' change:resolution' , () => { currentZoom .value = view .getZoom () })
168187})
169188
170189onBeforeUnmount (() => {
0 commit comments