obsidian-map-view icon indicating copy to clipboard operation
obsidian-map-view copied to clipboard

bug: embeddedMap missing query filtering after document change

Open SlowMorningCoding opened this issue 1 year ago • 2 comments

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

SlowMorningCoding avatar Jun 03 '24 14:06 SlowMorningCoding

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?

esm7 avatar Jun 08 '24 17:06 esm7

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

SlowMorningCoding avatar Jun 09 '24 20:06 SlowMorningCoding