Python Forum
How to print the map correctly
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to print the map correctly
#1
I wanted to create an HTML file which would depict the map of the world.I have written the sample code as shown below:

#Create a map object
m=folium.Map(location=[47.3601,-71.0589],zoom_start=12)


tooltip='click for more info'

#Create markers

folium.Marker([42.363600,-71.099500],popup='<strong>Location1</strong>',tooltip=tooltip).add_to(m)

folium.Marker([42.333600,-71.099500],popup='<strong>Location2</strong>',tooltip=tooltip,icon=folium.Icon(icon='star')).add_to(m)

folium.Marker([42.377120,-71.099500],popup='<strong>Location1</strong>',tooltip=tooltip,icon=folium.Icon(color='purple')).add_to(m)

folium.Marker([42.374180,-71.099500],popup='<strong>Location1</strong>',tooltip=tooltip,icon=folium.Icon(color='green',icon='leaf')).add_to(m)

folium.CircleMarker([42.466470,-70.942110],radius=50,popup='Yo Man',color='#428bca',fill=True,fill_color='#428bca').add_to(m)

m.save('map.html')
This map location shows a point in USA.
Now, I wanted the HTML to show the entire world.I would like to know what should be the latitude and longitude so that the map displays the entire world as the world map, without repetition on each side?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Print Not Printing Correctly kittylexi 3 3,295 Sep-11-2018, 04:38 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020