javalent / obsidian-leaflet

Adds interactive maps to Obsidian.md using Leaflet.js
481 stars 29 forks source link

[Feature Request] Reference/share a map definition while overriding settings #357

Open Jnosh opened 1 year ago

Jnosh commented 1 year ago

When using the same map in multiple places or notes, the full map definition needs to be provided each time.

It would be convenient to be able to define the base map settings (e.g. image, bounds, ...) only once and then reference that definition while overriding settings for additional occurrences of the map.

For example, there could be a main definition of a world map that configures the id, image map link and bounds as well as min & max zoom and sets the default zoom to show the whole map by default. On a note for e.g. a nation one might then want to use the same world map but show the local area of the nation instead by referencing the existing world map definition and overriding width, height, long, lat, and defaultZoom to adjust the default area shown without having to duplicate the entire map definition.