opengeos / leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
https://leafmap.org
MIT License
3.22k stars 386 forks source link

Upon installation, environment variables can be used to configure what widgets are available in the toolbar #405

Closed abarciauskas-bgse closed 1 year ago

abarciauskas-bgse commented 1 year ago

Description

There are a lot of widgets available in the tool bar, it would be preferable if upon installation of leafmap, the person installing the library could configure which widgets will show up in the default map. For example, I may just want the STAC widget and nothing else.

giswqs commented 1 year ago

Let me know the name of the environment variable you would like to use.

abarciauskas-bgse commented 1 year ago

🤔 I would think that each widget would have an environment variable, with a default value of "TRUE" or "FALSE", for example:

export WHITEBOX=FALSE
export TS_INSPECTOR=FALSE
export CREATE_VECTOR=FALSE
...
pip install leafmap

and then when the user creates a map with

import leafmap
m = leafmap.Map()
m

and you click the wrench 🔧 icon you only see the widget options set to "TRUE"

for MAAP's initial use case, we may only use "Discover STAC Catalog" widget.

giswqs commented 1 year ago

Good suggestion. I will work on that.