Open simon-leech opened 4 days ago
This shouldn't be shown by default and not shown with the false flag which is counter intuitive to mapp json.
The default should be to not show the button and show if configured.
This also opens a can of worms in regards to other elements. If there is an option for the zoomButton, should the zoomToExtentBtn be optional as well.
Should all of these flags be add to the layer JSON or perhaps should there be a config object.
layer.view === null, no view is created. Otherwise view will be the view element. We cannot change this.
The only option is see to not break the current behaviour without spamming more and more flags into the layer json is by creating a default object layer.viewConfig = {zoomBtn, zoomToExtentBtn, panelOrder} etc. And you can provide viewConfig taking away the options to change the behaviour.
All this should happen in a viewConfig method in the module to reduce the complixity of the view method exported from the module.
Description
Currently we always add the
zoomBtn
if the layer is zoom restricted. However, we should allow configuration to turn this off if the functionality is not required / contextually appropriate.I propose we instead do this, by making it an OR assignment we can make it
false
to hide it. e.g.(Asana Ticket)
Type of Issue
Please delete options that are not relevant, and select all options that apply.