javalent / obsidian-leaflet

Adds interactive maps to Obsidian.md using Leaflet.js
491 stars 30 forks source link

[Feature]: Creating Markers from frontmatter for map with multiple layers #386

Open zoccer5555 opened 1 year ago

zoccer5555 commented 1 year ago

Summary

Creating Markers from frontmatter for map with multiple layers

Detailed Description

When creating a leaflet map, it is possible to use a markerTag, markerFolder or markerFile to create markers via the frontmatter of other notes. But when the map consists of multiple layers, there is no way to define in the frontmatter on which layer the corresponding marker should appear.

Context and Use Case

I want to make my maps "immutable" in a sense that if i move my map or my linked notes around in my vault, it still works without me changing anything. Thats why i use a tag for every big map i make. I guess, if someone uses the option markerTag or markerFolder, it could happen that they also want to use multiple layers.

Possible Implementation(s)

I suggest giving an optional key like "layer: layer2" or an optional way to integrate it in the "location" key like "location: [5.4, -2.6, layer2]" or "location: [[5.4, -2.6] layer2]" or something like this. And this should create the same key-value pair which is created if one creates a marker on the layer by hand. I think it still should default to the first layer if no layer is given, because thats most often the biggest map.

Argue against Yourself

I guess if until now no one had an issue with that, maybe i'm the only one and its not that important. Most of the time i could just create multiple maps instead of one with multiple layers

Are you willing to personally help out on this project, such as design, documentation, coding, project management, etc? (Bold One)

I can't say how much overhead it is to get the environment started to code and test everything. I guess/hope this would be just the addition of one key? If i can help somehow, i would do it.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

zoccer5555 commented 1 year ago

Marking this as still wanted.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

MrYod commented 1 year ago

I found the same issue: with mutable markers you can choose the layer, but not with immutable ones... =(