esm7 / obsidian-map-view

Interactive map view for Obsidian.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FR: Support parsing location property as new Obsidian multi-line array format

evanharmon1 opened this issue · comments

When the location property is formatted as a multi-line array:

location:
  - lat
  - long

Mapview does not show the note in the mapview.

I believe the multi-line format is standard now so I think Mapview should at least show notes with this location format.

commented

It wasn't intentional, but I'm quite sure it works in the unreleased 5.0.0 version.
(It works for me now, and I'm pretty sure an unrelated improvement that I made has caused that, but I didn't see it not working before and working now 🤷 )
If you're into it, you can clone and build from this branch: https://github.com/esm7/obsidian-map-view/tree/v5.0
Or wait a week or two (hopefully) for the release, then verify :)

Ok, looks like a big release and a good one. I'll wait and see if that fixes it. Thanks for the plugin!

commented

Should work in the just-released 5.0.0.

Thanks, I tried the new version and my notes with a location property as a list (of lat, long coordinates) still don't show up.

I believe the issue is that Obsidian does not appear to support (recognize) a list of numbers, only a list of strings. E.g., when I add have:

location:
  - 39.100105
  - -94.5781416

Obsidian indicates that property has an unknown type, as indicated by a ? on the property. MapView notes like this do show up for me. But if I change it to strings:

location:
  - "39.100105"
  - "-94.5781416"

Obsidian recognizes it and removes the question mark. But notes like this do not show up in MapView for me.

I believe other plugins and templater automation require that Obsidian recognizes the property's type in order for it to be read properly, updated with templater, etc. E.g. The Geocoding Properties Plugin commands input its data to the frontmatter that in the end get saved as a list of strings. And a number of templater templates I use rely on my notes having recognized property types in order to update, etc.

Could you update MapView to recognize notes with lists of strings? I think that would be useful in the long run since that is what Obsidian is expecting with lists.

commented

Should now work in 5.0.2.

Awesome! Thanks for that. That will complete a great setup in Obsidian for location-based notes. Thanks again for the plugin.