This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
>
|
||||
<view class="weak-network-marker-anchor">
|
||||
<svg class="weak-network-marker-anchor-icon" viewBox="0 0 32 32" aria-hidden="true">
|
||||
<use :href="marker.iconHref"></use>
|
||||
<use :href="marker.iconHref" :xlink:href="marker.iconHref"></use>
|
||||
</svg>
|
||||
</view>
|
||||
<view
|
||||
@@ -119,7 +119,7 @@
|
||||
:data-testid="`weak-network-marker-label-${marker.poi.id}`"
|
||||
>
|
||||
<svg class="weak-network-marker-label-icon" viewBox="0 0 32 32" aria-hidden="true">
|
||||
<use :href="marker.iconHref"></use>
|
||||
<use :href="marker.iconHref" :xlink:href="marker.iconHref"></use>
|
||||
</svg>
|
||||
<text class="weak-network-marker-label-title">{{ marker.label }}</text>
|
||||
</view>
|
||||
@@ -153,7 +153,12 @@ import {
|
||||
type AmbientFacilityKind,
|
||||
type PoiDisplayPolicy
|
||||
} from '@/domain/poiDisplay'
|
||||
import { getPoiIconHref, resolvePoiIconKey, type PoiIconKey } from '@/domain/poiCategories'
|
||||
import {
|
||||
ensurePoiIconSprite,
|
||||
getPoiIconHref,
|
||||
resolvePoiIconKey,
|
||||
type PoiIconKey
|
||||
} from '@/domain/poiCategories'
|
||||
import {
|
||||
getOverviewMapLabelDefinition,
|
||||
OVERVIEW_MAP_LABEL_DEFINITIONS
|
||||
@@ -239,6 +244,10 @@ type SceneView = 'overview' | 'floor'
|
||||
const MAX_WEAK_MAP_MARKERS = 72
|
||||
const DEFAULT_VIEWPORT_WIDTH = 390
|
||||
const DEFAULT_VIEWPORT_HEIGHT = 844
|
||||
// Exterior WebP maps have a deliberately compact zoom-out range. Reserve the
|
||||
// final step for the semantic handoff so one accidental zoom-out does not
|
||||
// immediately replace the indoor exterior with Tencent Map.
|
||||
const OUTDOOR_MAP_EXIT_VISIBLE_SPAN_RATIO = 0.975
|
||||
const ROUTE_START_SNAP_RADIUS_PX = 44
|
||||
const ROUTE_NAVIGATION_ENTRY_MS = 460
|
||||
const MIN_ROUTE_SEGMENT_DURATION_MS = 6000
|
||||
@@ -307,6 +316,7 @@ const emit = defineEmits<{
|
||||
boundaryAttempt: boolean
|
||||
referenceVisibleWorldSpan: number | null
|
||||
thresholdReached: boolean
|
||||
outdoorExitReached: boolean
|
||||
viewport: GuideViewportState
|
||||
}]
|
||||
viewportChange: [event: {
|
||||
@@ -359,6 +369,7 @@ const updateSurfaceSize = () => {
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
ensurePoiIconSprite()
|
||||
updateSurfaceSize()
|
||||
const surfaceElement = getSurfaceElement()
|
||||
if (typeof ResizeObserver !== 'undefined' && surfaceElement) {
|
||||
@@ -861,6 +872,20 @@ const referenceVisibleWorldSpan = computed<number | null>(() => {
|
||||
return Number.isFinite(span) && span > 0 ? span : null
|
||||
})
|
||||
|
||||
const hasReachedOutdoorMapExitBoundary = (viewport: GuideViewportState) => {
|
||||
if (viewport.scene !== 'overview') return false
|
||||
|
||||
const maximumViewport = clampGuideViewport({
|
||||
...viewport,
|
||||
visibleWorldSpan: Number.MAX_SAFE_INTEGER
|
||||
}, activeWorldBounds.value, surfaceSize.value)
|
||||
const maximumVisibleWorldSpan = maximumViewport.visibleWorldSpan
|
||||
|
||||
return Number.isFinite(maximumVisibleWorldSpan)
|
||||
&& maximumVisibleWorldSpan > 0
|
||||
&& viewport.visibleWorldSpan >= maximumVisibleWorldSpan * OUTDOOR_MAP_EXIT_VISIBLE_SPAN_RATIO
|
||||
}
|
||||
|
||||
const poiVisibilityTier = computed(() => getPoiVisibilityTier(
|
||||
referenceVisibleWorldSpan.value
|
||||
? (localViewport.value?.visibleWorldSpan || referenceVisibleWorldSpan.value)
|
||||
@@ -1053,6 +1078,7 @@ const emitZoomIntent = (
|
||||
currentVisibleWorldSpan: viewport.visibleWorldSpan,
|
||||
referenceVisibleWorldSpan: referenceSpan
|
||||
}),
|
||||
outdoorExitReached: direction === 'out' && hasReachedOutdoorMapExitBoundary(viewport),
|
||||
viewport
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user