javalent / obsidian-leaflet

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

[Feature Request] Additional options to disable UI / interaction features #352

Closed Jnosh closed 1 year ago

Jnosh commented 1 year ago

I have a couple minor requests for additional options to disable UI/interaction options on maps.

Disable Zooming

There is the existing noScrollZoom option which prevents zooming using the scroll wheel.

I would like an option to fully disable zooming, currently once can still zoom using the following methods:

Personally I would only need an option to fully disable zooming and don't have a need for a separate option to only disable scroll wheel zooming but other users might prefer the behaviour provided by noScrollZoom.

Potential syntax could be zoom: false or noZoom: true.

Disable Panning

It would also be useful to be able to disable panning. recenter can be used to limit panning but that doesn't fully disable it.

Potential syntax might simply be panning: false.

Disable marker creation

lock can be used to prevent moving markers but one can still add new markers. It would be nice to have an option to prevent the addition of new markers.

Personally I would be satisfied if lock: true would be expanded to encompass preventing the creation of new markers but other users might prefer separate options.

Disable distance measurements

This is less important to me personally since it doesn't change map data or position but I thought I might mention it as well since it kinda fits in with these options to disable interaction with the map.


My use cases are the following:

sigrunixia commented 1 year ago

@valentine195 V7 perhaps?

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.