Skip to content

this includes folium python package for drawing interactive cool graphs

Notifications You must be signed in to change notification settings

gpalve/python-folium-map

Repository files navigation

Python and Folium Map

GitHub issues GitHub forks GitHub stars GitHub license

Python and Folium Map is a basic building block for Python and Folium map project.

Installation

  1. Clone the repository:
git clone https://github.com/gpalve/python-folium-map.git
  1. Install the required Python packages:
pip install -r requirements.txt

Usage

  1. Import the folium module:
import folium
  1. Create a Map object:
map = folium.Map(location=[37.7749, -122.4194], zoom_start=12)
  1. Add markers to the map:
folium.Marker(location=[37.7749, -122.4194], tooltip='San Francisco').add_to(map)

You can customize the marker icon and tooltip text by passing additional parameters to the Marker method. For example, to use a custom icon:

icon_url = 'https://www.iconsdb.com/icons/preview/red/marker-2-xxl.png'
icon = folium.features.CustomIcon(icon_url, icon_size=(50, 50))
folium.Marker(location=[37.7749, -122.4194], tooltip='San Francisco', icon=icon).add_to(map)

To add a line between two points on the map:

points = [[37.7749, -122.4194], [37.3382, -121.8863]]
folium.PolyLine(points, color='red', weight=5, opacity=0.7).add_to(map)

You can also add other types of markers and shapes to the map, such as circles, polygons, and GeoJSON layers. Refer to the Folium documentation for more information.

License

Python and Folium Map is distributed

About

this includes folium python package for drawing interactive cool graphs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published