Skip to content

Markers with multiple tileServers only showing on first layer/map #477

Description

@rbrueckner

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

Markers declared in a code block via "marker" should show in any layer/map (defined as a list in "tileServer") after switching via the UI layer switch button.

Current behaviour

The markers appear in the first layer (first item in the tileServer list), but when I switch to any other layer they disappear.

Reproduction

With the latest Obsidian (v 1.12.4) and latest Obsidian Leaflet plugin (v 6.0.5), add the following code block to any markdown file:

id: example-map
coordinates: [47.24229396316055, 9.944679837681283]
osmLayer: false
tileServer:
  - https://cdn.lima-labs.com/{z}/{x}/{y}.png?api=demo|Base map
  - https://tile.opentopomap.org/{z}/{x}/{y}.png|Terrain
  - https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}|Satellite
tileOverlay:
- https://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{z}/{y}/{x}|Labels
height: 800px
defaultZoom: 13
maxZoom: 20
marker:
- default,47.230079,10.0231144,,Marker 1,,
- default,47.2192086,9.8394453,,Marker 2,,

Then switch to another layer via the UI layer switch button.
The markers disappear and only show once you switch back to the first base layer.

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

1.12.4 and 1.8.4

Plugin Version

6.0.5

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

I'm not sure, but it feels like a missing reload of the markers after switchting to a different (base) layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions