Unverified Commit 852a1807 authored by Michael Underwood's avatar Michael Underwood Committed by GitHub
Browse files

Merge pull request #171 from lukkyjoe/geoJSON-missing-context

Pass context into geoJSONSetup and tileLayerSetup
parents 2996e8a1 35b3892f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ export default {
    const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);
    const addLayer = inject("addLayer");

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

    onMounted(async () => {
      const { geoJSON, DomEvent } = useGlobalLeaflet
+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
+3 −2
Original line number Diff line number Diff line
@@ -11,10 +11,11 @@ export const props = {
  },
};

export const setup = (props, leafletRef) => {
export const setup = (props, leafletRef, context) => {
  const { options: layerOptions, methods: layerGroupMethods } = layerGroupSetup(
    props,
    leafletRef
    leafletRef,
    context
  );

  const options = {
+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,