Skip to content

l-geo-json - how to keep layer in the background when more that 1 layer is used #516

@udos

Description

@udos

Versions

  • Leaflet: v1.6.0
  • Vue: v2.6.10
  • Vue2Leaflet: v2.4.2

I am passing data (through prop segments) from a parent component to a child component which gets rendered in 2 l-geo-json components:

<template>
  <div>
    <l-geo-json :geojson="segments" :options="{ bringToFront: true }" key="r" />
    <l-geo-json
      v-if="concatenate && routeSegments"
      :geojson="routeConcatenated"
      :options="{ bringToBack: true }"
      key="r_concat"
    />
  </div>
</template>

with the options bringToFront/bringToBack I am trying to define the order of the layers but they are "ignored" (probably because I'm applying them wrong...).

I also tried to switch the sequence in which they are listed without success...

any suggestions what I'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions