leaflet-nextjs-ts-starter icon indicating copy to clipboard operation
leaflet-nextjs-ts-starter copied to clipboard

add global view state handling

Open richard-unterberg opened this issue 5 months ago • 0 comments

firestarter: https://github.com/richard-unterberg/leaflet-nextjs-ts-starter/issues/24

  • add zustand
  • create map store slice
  • implement only viewState
interface ViewState {
    boundingBox: BoundingBox
    center: LatLnLike
    zoom: number
}
  • implement in header
  • edit examples using new slice

additional resources:

  • add simple viewState check: https://github.com/richard-unterberg/leaflet-nextjs-ts-starter/commit/0ac904d36aa8d94a0e3755d61d43933941036c15
  • https://github.com/richard-unterberg/maplibre-nextjs-ts-starter/blob/main/src/zustand/useMapStore.ts

richard-unterberg avatar Sep 19 '24 13:09 richard-unterberg