FR: Map paths (again and alternative)
Hi, as you have mentioned in issue #186:
That's a highly requested feature -- ... Long story short, Map View is first and foremost a UI-centric tool (unlike Obsidian Leaflet, for example, which is code-block based). It will not introduce features without backing them up with a strong interactive user experience. So although the basic functionality of displaying paths, reading them from GPX, GeoJSON etc is quite simple (due to being mostly handled by great Leaflet.js plugins), the full toolset required to build a proper user experience around this functionality requires a lot of work. As a bare minimum, we'd need a separate set of settings to format displayed routes based on some rules (similarly to markers but very different) and a different set of query controls and logic to filter routes (you surely don't want a large bunch of routes to be displayed on the map all the time).
Originally posted by @esm7 in https://github.com/esm7/obsidian-map-view/issues/186#issuecomment-1660781192
I fully understand it's a highly requested and doable feature but too much to be done in UI part. But would it be possible to provide some basic funtion just to read and render a path/Polyline/polygon and filter it with a single function in the Topleft Pane of MapView leaf: a boolean to show, which show only the Polylines of active page?
If it costs too much time, would it be possible for you to merge it when I/someone else make/s a PR?
Thanks a lot for maintaining and keep upgrading this awesome Job, our great esm7!
I gave this some thought and it sounds very reasonable to me to make some minimal feature set for this as you suggest, with the disclaimer that it's work-in-progress and backwards compatibility may not remain in future versions. Maybe something like reading stand-alone GPX files from the vault and GPX files that are linked from existing markers, with a basic on/off + color functionality similar to the Links tab. This can serve as the initial stage until I (or someone else) find the time for a more fully-fledged UI for this the way I imagine it.
What about doing the same, like with markers, by parsing location as front matter or hyperlink from notes? For routes, this would mean a WKT block in the front matter or somewhere as block.
Then no need for a gpx, kml, etc. file, or else. The rendering could be done as with markers, by tagging the note with the route.
Finally - Map View 6.0.0 released with a very comprehensive paths support!