Git Product home page Git Product logo

python-folium-map's Introduction

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

python-folium-map's People

Contributors

gpalve avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.