-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colormap not being applied to geojson #87
Comments
Can you send your GeoJSON so I can do some testing? Does our example work for you? |
I found something odd in my_data, those ID's are not present in geojson, no wonder the color scale is not applied. I will post back after further debugging. Thanks for your willingness to look further. |
Glad to help. Closing the issue. |
I have exact same problem and the your example does not work same as mine. |
@electronjaal Can you provide more information about your configuration (system, browser, using conda? folium and python version) |
system: OS X 10 EI Capitan version 10.11.3 |
@electronjaal write our example in a script.py file and run |
Thank you for reply. When run python command in my terminal it showed following information. Python 2.7.11 |Anaconda 2.0.1 (x86_64)| (default, Dec 6 2015, 18:57:58) and run python script.py result was same nothing changed. |
I wonder if it cannot be due to safari rather than the python version (Python 2.7.11 |Anaconda 2.0.1 is a rather classical setup). Can you post the HTML output of the script, please (so that we can check the code produced) ? |
"type": "FeatureCollection",
|
So this is not Safari ; your outputed geoJSON does not contain styling properties, as if the This might be something about your installation of folium. Can you please make sure you're really pointing to print(folium.__version__, folium.__file__) If everything's normal, can you please print (the beginning of) the output of these two lines (to be appended to the example script): geo = [x for x in states2._children.values() if isinstance(x,folium.GeoJson)][0]
print(geo.style_data()) Normally, you shoould get something like: {"features": [
{
"geometry": {
"coordinates": [[[-87.359296, 35.00118], ...]],
"type": "Polygon"
},
"id": "AL",
"properties": {
"name": "Alabama",
"style": {"color": "black", "fillColor": "#8C96C6", "fillOpacity": 0.7, "opactiy": 0.5, "weight": 1}
},
"type": "Feature"
}, ... where |
|
You're on |
Thanks so much, I am very appreciate you looking into it and finding a fix. |
Happy to help! |
Colormap is not being applied to the geojson? the polygons keep appearing black, although legend shows the correct color bar.
The text was updated successfully, but these errors were encountered: