javalent / obsidian-leaflet

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

[Feature Request] Option to provide a rectangle to define the initial bounds & location for an image map #355

Closed Jnosh closed 1 year ago

Jnosh commented 1 year ago

For image based maps when wanting to set the initially visible portion of the map, one currently has to experiment with lat, long and defaultZoom to find values provide the desired result.

It would be much more straightforward to be able to simply provide the bounds in pixels and center (or one of the corners) coordinates with the location & zoom level calculated automatically to show the desired region.

(The visible width or height might of course need to be expanded depending on the `width, height and preserveAspect settings.)

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.