[Feature request] - Marker icon rules - read from properties
The current marker rules only read note tags. In my workflow, I don't usually use tags, but rather properties (e.g., instead of tags:\n - campingsite I use types:\n - "[[Camping site]]"). To have special icons for various note types, I now add tags, but this duplicates some of my work. Is there any chance to support general properties in a future release?
That's a really cool idea. How do you foresee the syntax for these properties? Making a generic rules mechanism for properties is probably far more excessive than for tags. Making a property for the icon is very easy, but might not be flexible enough for some users.
Thanks for the feedback!
I would probably not try to reinvent the wheel but instead use Obsidian's basic query rules. E.g.,
The [properyname:propertyvalue] syntax returns every note whose propertyname either equals propertyvalue or contains it as an element in a list. It also ignores the square brackets and is case-insensitive by default.
Oh nice. I knew somewhere in the back of my head it exists but never tried it. Will look into it.
By the way, I would apply the same concept for filters - you already allow there most of what Obsidian's search allows. Shall I open a distinct issue for that?
Unfortunately mimicking Obsidian's search is a pain. I discussed with the Obsidian developers years ago to provide an API to the search capabilities, they agree with the need but never came to it. So Map View has its own query mechanism, and if you think of other operators that could be useful, I prefer to cherry pick them than to play catch-up. (Regardless, to my understanding this is about to change soon, as Obsidian is about to introduce its own querying mechanism based on Data View. I'm hopeful it will have a formal API and Map View can plug into that.)
Sounds good. Thank you again so much! (bought you a coffee). I'll open a distinct issue for filtering in map view in terms of properties.
i second the ability to set marker icon rules based on things other than tags (e.g. properties values, linkedto, linkedfrom)
i too use [[tags]] instead of #tags, so the Tags Pane is empty and there is zero #tag in the system. The natural way to get MapView to display custom markers will mean creating and using tags, and this will populate the Tags Pane with a inexhaustive list of tags (since some are inline as tag:tagname and not parsed in the global Tags Pane). So currently i think i prefer exclusively using locations: YMAL and inline tag:tagname for everything even it's a one-location-dedicated note; this is cleaner but not semantically optimal.
just some new perspective on this issue. amazing plugin ❤️
I'm all for that. Hopefully at some point later this year, after we're through with GeoJSON, GPX support and such (which is the top user request for Map View), I can do an overhaul for how Map View does filtering and marker icons and incorporate much more sophisticated rule sets.
This now works in Map View 6.0.0 :)