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:
double clicking the map
shift-dragging to zoom to the selected area
pinch to zoom on mobile devices
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:
Maps with fixed markers (defined in the map definition or through frontmatter) where I don't want to accidentally create or modify markers. This could be accomplished by using lock: true and an option to disable marker creation or an option that combines both.
Show a fixed part of a larger map. e.g. on a page for a location, show a fixed, zoomed-in view of the local area on a larger world-map or show a particular room of a battle map. For this I would like to fully disable zooming, panning, and marker creation and modification. Basically a read-only mode that only allows clicking/hovering existing markers but not modifying the map data or moving the map position or zoom level.
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.
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
ornoZoom: 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:
lock: true
and an option to disable marker creation or an option that combines both.