esm7 / obsidian-map-view

Interactive map view for Obsidian.md
MIT License
546 stars 25 forks source link

bug: embeddedMap missing query filtering after document change #246

Open SlowMorningCoding opened 3 weeks ago

SlowMorningCoding commented 3 weeks ago

When a page with an embedded map is filtered using a query string, the map initially displays only the filtered markers correctly. However, editing the page itself triggers the "updateMarkersWithRelationToFile" method, which lacks proper marker filtering. This results in all markers being displayed again, regardless of the previously applied filter.

This bug is detected in version 5.0.2 of the map-view plugin for the Obsidian desktop application

esm7 commented 2 weeks ago

Can you elaborate a little more on how you filter the page using a query string: do you create the map with the query in the first place, and it later disappears?

SlowMorningCoding commented 2 weeks ago

For example, I have planned a geocache route and I use an embedded map for it. In the map I use query "path:\"$filename$\" AND NOT tag:#gc/found" and it works when the map is rendered, as in the first picture.

image

But when the page is edited, the filtered out "found" geolocation appears on the map, as shown in the second image.

image