(feature)
| 21 | ) |
| 22 | |
| 23 | def style_function(feature): |
| 24 | default_style = { |
| 25 | "opacity": 1.0, |
| 26 | "fillColor": "#ffff00", |
| 27 | "color": "black", |
| 28 | "weight": 2, |
| 29 | } |
| 30 | |
| 31 | if feature["properties"]["name"] == "Colorado": |
| 32 | default_style["fillPattern"] = stripes |
| 33 | default_style["fillOpacity"] = 1.0 |
| 34 | |
| 35 | if feature["properties"]["name"] == "Utah": |
| 36 | default_style["fillPattern"] = circles |
| 37 | default_style["fillOpacity"] = 1.0 |
| 38 | |
| 39 | return default_style |
| 40 | |
| 41 | data = os.path.join(os.path.dirname(__file__), os.pardir, "us-states.json") |
| 42 | folium.GeoJson(data, style_function=style_function).add_to(m) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…