Python Forum
Showing only one country in Folium - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Showing only one country in Folium (/thread-22141.html)



Showing only one country in Folium - tantony - Oct-31-2019

I have a script that generates a folium map using Python and Folium. Please click on the link below to see.

http://airport-metars.ddns.net/

As you can see, it shows the map of the world. How can I show only the map of US?


RE: Showing only one country in Folium - nilamo - Oct-31-2019

Start with a higher zoom level, so less of the world is visible?
I don't think you can choose to just not render the rest of the map, if that's what you mean.


RE: Showing only one country in Folium - tantony - Oct-31-2019

(Oct-31-2019, 07:06 PM)nilamo Wrote: Start with a higher zoom level, so less of the world is visible?
I don't think you can choose to just not render the rest of the map, if that's what you mean.

Thanks for the reply, that's what I'm already doing. So its not possible to NOT render the rest of the map?


RE: Showing only one country in Folium - nilamo - Nov-01-2019

Anything is possible, if you try hard enough :p

https://python-visualization.github.io/folium/ Wrote:The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys

So if none of those providers support it (I know at least OpenStreetMaps can't render only specific countries), then you could make your own map tiles and use those.

Or maybe you can use overlays to just try hiding everything else? https://python-visualization.github.io/folium/quickstart.html#GeoJSON/TopoJSON-Overlays