Streamlit: Make map points bigger

Created on 31 Oct 2019  Â·  3Comments  Â·  Source: streamlit/streamlit

Summary

st.map() function doesn't work properly. Whenever I feed a pandas dataframe with lat and lon it shows the map, but I have to zoom to the desired state level to see the plotted dots.

Steps to reproduce

What are the steps we should take to reproduce the bug:
Please visit the link to my GitHub gist given in the additional information section, and run the code. It will plot the points and show the map. However, you'll have to zoom to Washington DC to see the plotted points. Also, I tried using the zoom parameter in st.map() function, but still have to zoom in to Washington DC to see the plotted points.

Expected behavior:

It should automatically hover to the state or city wherever the latitude and longitudes belong to and show the plotted points. We should not need to zoom in and hover over the map to see the plotted coordinates manually.

Actual behavior:

Explain the buggy behavior you experience when you go through the steps above.
If applicable, add screenshots to help explain your problem.

Is this a regression?

no

Debug info

  • Streamlit version: Streamlit, version 0.49.0
  • Python version: Python 3.6.8
  • Pip Version: pip 19.3.1
  • OS version: Ubuntu 18.04.3 LTS
  • Browser version: Google Chrome 78.0.3904.70

Additional Information:

link to the code: https://gist.github.com/ShivamBhirud/908a665b0a46cc2415a2dd95e1f63784

charts enhancement

Most helpful comment

Hey @dcaminos,

I have the same issue as @ShivamBhirud where the scatter points are plotted but aren't visible unless you zoom-in. I understand this is because my datapoints cover a large range of latitude values.

I would like to know if there is a way to make the points bigger, thus making the points visible without having to zoom-in. My goal is to be able to pinpoint a location on a map (see enclosed image).

Thanks and best wishes for 2020 :-)

Capture

All 3 comments

Hey @ShivamBhirud, thanks for writing up the bug report!

I was just taking a look at your data. It looks like this isn’t a bug, but instead is due to a large range of latitude values (from ‘8.9056997’ to ‘42.6795631304348’).

Would you mind checking your data and trying again?

The st.map widget should center the map based on your imputed data.

@dcaminos Sure, I'll try it as you instructed. Thanks!

Hey @dcaminos,

I have the same issue as @ShivamBhirud where the scatter points are plotted but aren't visible unless you zoom-in. I understand this is because my datapoints cover a large range of latitude values.

I would like to know if there is a way to make the points bigger, thus making the points visible without having to zoom-in. My goal is to be able to pinpoint a location on a map (see enclosed image).

Thanks and best wishes for 2020 :-)

Capture

Was this page helpful?
0 / 5 - 0 ratings