javalent / obsidian-leaflet

Adds interactive maps to Obsidian.md using Leaflet.js
468 stars 26 forks source link

[Bug]: GPX Track inconsistently displayed #392

Closed tgrosinger closed 11 months ago

tgrosinger commented 1 year ago

Check for existing bug reports before submitting.

Expected Behavior

Display a single GPX track on a map, zoomed to the location of the track.

Current behaviour

The map correctly zooms by default to where the gpx track should be displayed, however only the start marker is visible.

Sometimes (rarely, zooming will cause the track to appear). Usually I have to click the start marker and click the "Elevation" checkbox. After deselecting, the track remains visible. See the demo below.

Obsidian-Leaflet-Demo-Reduced

The file being used is here (remove .txt extension):

point-lawrence-2.gpx.txt

Reproduction

  1. Download the gpx file from the "Current behavior" section and place in a folder called "assets/gpx".
  2. Create a new note in Obsidian
  3. Paste the following code block:
id: 2023-05-21 Hike Orcas Point Lawrence
gpx:
  - [[point-lawrence-2.gpx]]
gpxColor: #fff
zoomFeatures: true
maxZoom: 19
gpxMarkers:
  start: default
  waypoint: default
  1. View the map. Note that no gpx track is displayed (see demo video above)
  2. Zoom in and out, this might trigger displaying the track
  3. Click the Start marker and click the "Elevation" checkbox. Deselect the track. The track should remain shown.

Which Operating Systems are you using?

Obsidian Version Check

1.3.2 and 1.1.9

Plugin Version

5.6.1

Confirmation

Possible solution

No response

tgrosinger commented 1 year ago

This is happening with all of the GPX files I have tried so far.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

tgrosinger commented 1 year ago

This issue definitely still exists. Just tested to confirm. Please do not close.