#!/usr/bin/env python # coding: utf-8 # # Display a Web Scene ArcGIS DevLab # # This is the completed solution for the [Diplay a web scene](https://developers.arcgis.com/labs/develop/python/display-a-web-scene) ArcGIS DevLab. [ArcGIS DevLabs](https://developers.arcgis.com/labs) are short introductory tutorials to guide you through the three phases of building geospatial apps: Data, Design, Develop. # In[2]: from arcgis.gis import GIS dev_gis = GIS("https://www.arcgis.com") print("Connected to {}".format(dev_gis.properties.portalName)) # In[3]: webscene_search = dev_gis.content.search(query="LA Trails *", item_type="Web Scene") webscene_search # In[4]: webscene_item = webscene_search[0] webscene_item # ## To display a web scene in your notebook, query the `WebScene` object. # In[ ]: from arcgis.mapping import WebScene la_trails = WebScene(webscene_item) la_trails # ## Challenge # In[6]: op_layers = la_trails['operationalLayers'] print("The web scene has {} layers".format(len(op_layers))) # In[7]: for lyr in op_layers: print("{}\n\t{}".format(lyr['title'], lyr['url']))