Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional Esri tile sources #176

Merged
merged 3 commits into from
May 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/gallery/bokeh/tile_sources.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
"metadata": {},
"outputs": [],
"source": [
"%%opts WMTS [width=400 height=400 xaxis=None yaxis=None] (level='annotation')\n",
"(gvts.OSM + gvts.ESRI + gvts.Wikipedia + gvts.StamenToner).cols(2)"
"%%opts WMTS [width=200 height=200 xaxis=None yaxis=None] (level='annotation')\n",
"(gvts.OSM + gvts.Wikipedia + gvts.StamenToner + gvts.EsriNatGeo +\n",
" gvts.EsriImagery + gvts.EsriUSATopo + gvts.EsriTerrain + gvts.EsriReference).cols(4)"
]
}
],
Expand Down
39 changes: 34 additions & 5 deletions geoviews/tile_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
('openstreetmap',) : (
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
),
('cartodb') : (
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors,'
('cartodb',) : (
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, '
'&copy; <a href="https://cartodb.com/attributions">CartoDB</a>'
),
('cartocdn') : (
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors,'
('cartocdn',) : (
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, '
'&copy; <a href="https://cartodb.com/attributions">CartoDB</a>'
),
('stamen', 'terrain') : (
Expand All @@ -27,6 +27,26 @@
),
('wikimedia',) : (
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
),
('arcgis','Terrain') : (
'&copy; <a href="http://downloads.esri.com/ArcGISOnline/docs/tou_summary.pdf">Esri</a>, '
'USGS, NOAA'
),
('arcgis','Reference') : (
'&copy; <a href="http://downloads.esri.com/ArcGISOnline/docs/tou_summary.pdf">Esri</a>, '
'Garmin, USGS, NPS'
),
('arcgis','Imagery') : (
'&copy; <a href="http://downloads.esri.com/ArcGISOnline/docs/tou_summary.pdf">Esri</a>, '
'Earthstar Geographics'
),
('arcgis','NatGeo') : (
'&copy; <a href="http://downloads.esri.com/ArcGISOnline/docs/tou_summary.pdf">Esri</a>, '
'NatGeo, Garmin, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp.'
),
('arcgis','USA_Topo') : (
'&copy; <a href="http://downloads.esri.com/ArcGISOnline/docs/tou_summary.pdf">Esri</a>, '
'NatGeo, i-cubed'
)
}

Expand All @@ -44,9 +64,18 @@
StamenTonerBackground = WMTS('http://tile.stamen.com/toner-background/{Z}/{X}/{Y}.png')
StamenLabels = WMTS('http://tile.stamen.com/toner-labels/{Z}/{X}/{Y}.png')

# Esri maps (see https://server.arcgisonline.com/arcgis/rest/services for the full list)
EsriImagery = WMTS('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{Z}/{Y}/{X}.jpg')
EsriNatGeo = WMTS('https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{Z}/{Y}/{X}')
EsriUSATopo = WMTS('https://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{Z}/{Y}/{X}')
EsriTerrain = WMTS('https://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer/tile/{Z}/{Y}/{X}')
EsriReference = WMTS('http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer/tile/{Z}/{Y}/{X}')
ESRI = EsriImagery # For backwards compatibility with gv 1.5


# Miscellaneous
OSM = WMTS('http://c.tile.openstreetmap.org/{Z}/{X}/{Y}.png')
ESRI = WMTS('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{Z}/{Y}/{X}.jpg')
Wikipedia = WMTS('https://maps.wikimedia.org/osm-intl/{Z}/{X}/{Y}@2x.png')


tile_sources = {k: v for k, v in locals().items() if isinstance(v, WMTS)}