esm7/obsidian-map-view

Use tag rather than YAML to identify notes with locations

mjknght opened this issue · 6 comments

Hi there,

Excellent plugin! For various reasons that I won't go into, I don't want to use YAML that appears above an initial H1 header. I thought at first I could just use the inline location links, but I see that the YAML is still needed to identify which notes should be scanned for locations. So I'd like to suggest that, if possible, we be given the option to identify notes with locations by using a particular tag rather than YAML. Thanks for considering this! (P.S. Adding the support requested by others below for Dataview would also solve my problem.)

esm7 commented

That's a nice idea and pretty easy to do. Do you mind also linking to the Dataview-related option that you mentioned?

That's great! A tag, for me, would be the most elegant solution by far. I don't currently use Dataview, but I know that they do allow YAML-like data to be placed after an initial header. Issue #9 discussed this, which was what gave me the inspiration. But +1 for a tag for me!

esm7 commented

Added in 3.0.2.

This works very well indeed – thank you so much for this! Just updated, and very grateful for how easy this makes the plugin to work with.

This is great already, but I do have one small request, which is for the tag to allow for nested tags. Let me explain why. I have lots of #locations tags already in my notes, but they all have nested tags, e.g. #locations/cities #locations/buildings etc. At the moment I need to add this tag for a second time without any nested tags for the location to be picked up. But if all that was required was for the top-level tag to be present, suddenly everything I already have would appear on the map. Thanks for you consideration and thanks again for adding this feature!

esm7 commented

This is very doable, but would you mind opening a new issue for this, so it won't get lost? Maybe I'll even be able to do it in the upcoming change set later this week.

Thanks for a quick response and for considering this one!