Commit 35b3892f authored by Joseph Luk's avatar Joseph Luk
Browse files

Pass context into tileLayerSetup

parent 689dcb6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ export default {
    const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);
    const addLayer = inject("addLayer");

    const { options, methods } = tileLayerSetup(props, leafletRef);
    const { options, methods } = tileLayerSetup(props, leafletRef, context);

    onMounted(async () => {
      const { tileLayer, DomEvent } = useGlobalLeaflet
+2 −2
Original line number Diff line number Diff line
@@ -20,11 +20,11 @@ export const props = {
  },
};

export const setup = (props, leafletRef) => {
export const setup = (props, leafletRef, context) => {
  const {
    options: gridLayerOptions,
    methods: gridLayerMethods,
  } = gridLayerSetup(props, leafletRef);
  } = gridLayerSetup(props, leafletRef, context);
  const options = {
    ...gridLayerOptions,
    tms: props.tms,