Adding more options to st.map

I realize that st.map is supposed to be for quick and simple plots while st.deck_gl_chart is meant for more complex maps. But Iā€™m wondering if it would be reasonable to add a couple more features to st.map to cover the most common usecases. Primarily Iā€™m thinking about adding a color option where you can select which column to use for setting the pointsā€™ colors. If the column is numeric it will use a colormap over that range, if the column is categorical it will attribute a random color to each category. Perhaps also have something similar for radius.

These two options would cover many of the common uses for plotting on maps that I currently have.

Hey @dwastberg,

Welcome to the forums!

Iā€™ve filed an issue for this for us to discuss internally. https://github.com/streamlit/streamlit/issues/757

We currently have similar functionality for st.deck_gl_chart with getColor and getRadius as mentioned in the docs https://streamlit.io/docs/api.html#streamlit.deck_gl_chart

Is adding this functionality to st.map what youā€™re looking for?

Hey @dwastberg,

After some internal discussionā€¦ st.map is meant to be a one-shot solution that is not configurable.

Looks like youā€™ll need to go through st.deck_gl_chart for color support.

Weā€™re also re-writing our DeckGL implementation and will be moving towards PyDeck in the near future so keep your eyes peeled for that.

Fair enough. The move to PyDeck sounds interesting. Iā€™ll definitely keep an eye out for that.

Sounds good.

Just to give you a bit more infoā€¦ the thinking is that creating a charting library is hard and other projects are devoted 100% to that. So letā€™s use those projects and plug directly into their api as much as possible instead of creating our own charting library api via st.map.

Cheers

Makes sense. Looking closer at PyDeck (which I hadnā€™t heard of), Iā€™m thinking it might more sense to build the things I have in mind within that space and then have them show up ā€˜for freeā€™ in streamlit down the road.

While we are asking for more wonderful features for st.map it would be nice to also have a label that would appear if you hovered over a circle. I have an application where the number of points is in the small few hundred range. I know it doesnā€™t scale but ā€œItā€™s nice to want thingsā€. :slight_smile: