Skip to content

Instantly share code, notes, and snippets.

@DavidHickman
Created May 5, 2016 18:06
Show Gist options
  • Save DavidHickman/0e300d921d88ba61326a1241fde0ecf6 to your computer and use it in GitHub Desktop.
Save DavidHickman/0e300d921d88ba61326a1241fde0ecf6 to your computer and use it in GitHub Desktop.
import folium
def simple_folium_map(lat, lng, description):
"""
Create a simple webmap with a green circle marker
Stamen map tile options = ['Stamen Toner', 'Stamen Terrain']
"""
# Create webmap html
webmap = folium.Map(location=[lat, lng], tiles='Stamen Toner', zoom_start=16)
# Create circle marker over center green and add to the map
feature_marker = folium.CircleMarker([lat, lng],
radius=50,
popup=description,
color='#009933',
fill_color='#33cc33'
).add_to(webmap)
# Save the map to an output file
webmap.save("simple_folium_map.html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment