Search code examples
pythonpython-3.xmapsgeospatialfolium

Not getting a map in Folium


I am trying to create a map for "Ecuador" country with the coordinates 1.8312° S, 78.1834° W in Folium map using the below code

map = folium.Map(location=[1.8312, 78.1834], zoom_start=12)
map

The map is not appearing and getting below empty output

enter image description here

When I tried for another country example: US, I am getting an output. Not sure why I am not getting for Ecuador. I am using Jupyter notebook.


Solution

  • The coordinates you used (1.8312, 78.1834) refer to south and west. Folium needs north and east.

    Therefore, use:

    import folium
    
    m = folium.Map(location=[-0.22985, -78.52495], zoom_start=12)
    
    m
    

    and you get your map:

    enter image description here