Skip to content

Commit

Permalink
fix: make persistent layers #421
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Nov 7, 2024
1 parent 778c533 commit d491172
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions composables/useIsochrone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export default function useIsochrone() {
const { t, locale } = useI18n()
const map = useState<Map>('map-instance')
const profile = useState('isochrone-profile')
const layers = useState<string[]>('isochrone-layers', () => [])
const { boundOptions } = storeToRefs(useMapStore())

//
// Data
//
const isOverlayOpen = ref(false)
const layers = ref<string[]>([])
const sourceName = 'isochrone'
const colorExpression = [
'match',
Expand All @@ -56,7 +56,6 @@ export default function useIsochrone() {
// Methods
//
const reset = () => {
// FIXME: Issue with HMR, layers is empty but layers and source are still present on map
layers.value.forEach(layerId => map.value.removeLayer(layerId))
layers.value = []

Expand Down

0 comments on commit d491172

Please sign in to comment.