#!/usr/bin/env python # coding: utf-8 # In[1]: import os import folium print(folium.__version__) # In[2]: from datetime import date today = '{:%Y-%m-%d} 12:00'.format(date.today()) m = folium.Map(location=[41, -70], zoom_start=5) folium.WmsTileLayer( url='http://demo.opengeo.org/geoserver/ows', layers='nasa:bluemarble', name='bluemarble', format="image/png", ).add_to(m) url = 'http://hfradar.ndbc.noaa.gov/tilesavg.php?s=20&e=100&x={x}&y={y}&z={z}&t=%s&rez=1' % today folium.TileLayer( tiles=url, attr='hfradar.ndbc.noaa.gov', name='hfradar 1km', overlay=True ).add_to(m) folium.LayerControl().add_to(m) m.save(os.path.join('results', 'WMS_and_WMTS.html')) m