#!/usr/bin/env python # coding: utf-8 # In[1]: import os import folium print(folium.__version__) # In[2]: m = folium.Map(location=[41, -70], zoom_start=5, tiles=None) folium.raster_layers.TileLayer( tiles='http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', attr='google', name='google maps', max_zoom=20, subdomains=['mt0', 'mt1', 'mt2', 'mt3'], overlay=False, control=True, ).add_to(m) folium.raster_layers.TileLayer( tiles='http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', attr='google', name='google street view', max_zoom=20, subdomains=['mt0', 'mt1', 'mt2', 'mt3'], overlay=False, control=True, ).add_to(m) folium.raster_layers.WmsTileLayer( url='https://demo.boundlessgeo.com/geoserver/ows?', layers='nasa:bluemarble', name='bluemarble', fmt='image/png', overlay=False, control=True, ).add_to(m) folium.raster_layers.WmsTileLayer( url='http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi', name='test', fmt='image/png', layers='nexrad-n0r-900913', attr=u'Weather data © 2012 IEM Nexrad', transparent=True, overlay=True, control=True, ).add_to(m) folium.LayerControl().add_to(m) m.save(os.path.join('results', 'WMS_and_WMTS.html')) m