Skip to content

Commit

Permalink
Use getLayer and getSource id to remain active on basemap change
Browse files Browse the repository at this point in the history
  • Loading branch information
hvangeffen committed Dec 16, 2024
1 parent 1f9cc9c commit 9040e44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/wms/OverlayLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ import type { OverlayLocation } from '@/lib/topology/componentSettings'
import { fetchLocationSetAsGeoJson } from '@/lib/topology'
import { configManager } from '@/services/application-config'
import { asyncComputed } from '@vueuse/core'
import { getLayerId, getSourceId } from '@/lib/map'
interface Props {
overlay: OverlayLocation
}
const props = defineProps<Props>()
const sourceId = `overlay-source-${props.overlay.id}`
const layerId = `overlay-layer-${props.overlay.id}`
const sourceId = getSourceId(`overlay-${props.overlay.id}`)
const layerId = getLayerId(`overlay-${props.overlay.id}`)
const baseUrl = configManager.get('VITE_FEWS_WEBSERVICES_URL')
const geojson = asyncComputed(
Expand Down

0 comments on commit 9040e44

Please sign in to comment.