Coder Social home page Coder Social logo

kushal997-das / webmap Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 1.0 6.76 MB

👨‍💻This repo. is all about how we use folium Library in python to create maps & Markers.

Home Page: https://github.com/Kushal997-das/Webmap

License: GNU General Public License v3.0

HTML 58.75% Python 0.32% Jupyter Notebook 40.93%
folium-maps folium python3 jupyter-notebook html5 images location-tracker

webmap's Introduction

Hello programmer Welcome to this repo GitHub issues GitHub forks GitHub stars GitHub contributors

Folium

  • Folium is a powerful Python library that helps you create several types of Leaflet maps. ... To get an idea, just zoom/click around on the next map to get an impression.

Documentation

https://python-visualization.github.io/folium/

Pre-requisites:

Python
folium

Installation:

 $ pip install folium

or

$ conda install -c conda-forge folium

Importing module:

import folium

create a map object:

m = folium.Map(tiles='Stamen Toner', zoom_start=4)
#different tiles (map styles) can be used, like 'Stamen Toner', 'Stamen Terrain', ...
m = folium.Map(location=[46.961580, -102.560670], tiles='Mapbox Bright', zoom_start=4)
#m = folium.Map(location=[Latitude, Longitude])

Output1

That's how the map look like after executing the code.

How to check the latitide and Longitude for any location:

https://www.latlong.net/


In the above map we are unable to find the exact location right? That's the reason we are using icon for this and also use popup for displaying the location name.

folium.Marker(location=[46.961580, -102.560670],popup='india',icon=folium.Icon(icon='cloud')).add_to(m)

output2

That's how the map look like after executing the code.

Now we are going to locate three famous places in India using their Latitude and Longitude and put the image over the location.So that we can easily find out where the locations are:

  • Ayodhya RamMandir.
  • Taj Mahal.
  • Ladakh.

m = folium.Map(tiles='Stamen Toner', zoom_start=4)
ladakh = folium.features.CustomIcon("ladakh.jpg", icon_size=(100,100))
taj_mahhel = folium.features.CustomIcon("taj mahel.jpg", icon_size=(100,100))
rammandir= folium.features.CustomIcon("rammandir.jpg", icon_size=(100, 100))
folium.Marker([40.743720, -73.822030], tooltip="Ladakh", popup='Ladakh,India', icon=ladakh).add_to(m)
folium.Marker([39.760979, -84.192200], tooltip="Taj Mahal", popup='Taj Mahal,India', icon=taj_mahhel).add_to(m)
folium.Marker([54.464180, -110.182259], tooltip="Ayodhya RamMandir", popup='Ayodhya RamMandir,India', icon=rammandir).add_to(m)
print(m)

png


Code Links:

View source code in (.py)
View souce code in (.ipynb)
View HTML file

Live Demo:

live demo

Contributing

Please see CONTRIBUTING , CONTRIBUTING-CODE , CODE_OF_CONDUCT for details before you contribute.

LICENSE:

Copyright (c) 2020 Kushal Das

This project is licensed under the GNU General Public License v3.0



Let's connect! Find me on the web.



If you have any Queries or Suggestions, feel free to reach out to me.

Show some  ❤️  by starring some of the repositories!

webmap's People

Contributors

kushal997-das avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

programmer1473

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.