# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from arcgis.gis import GIS

gis = GIS()

#get map from id (containers several layers)
webmap = gis.content.get('41281c51f9de45edaf1c8ed44bb10e30')
webmap

#display map
from arcgis.mapping import WebMap
la_parks_trails = WebMap(webmap)
la_parks_trails

#get layer information
operational_layers = la_parks_trails.layers
n = len(operational_layers)
print("The webmap has {} layers.".format(n))

for layer in operational_layers:
    print("{}\n\t{}".format(layer['id'], layer['url']))



StarcoderdataJupyterScriptsDedupFiltered