Select to view content in your preferred language

Add kml layer to map in python notebook

206
0
03-26-2024 01:31 PM
Labels (2)
JackiBergman
New Contributor II

I'm trying to add a kml file to an existing webmap using a python notebook, but I keep getting the error

"Item object without layers or tables is not supported"

Here's my code-

kml_file = gis.content.search(query=my_project, item_type='kml')
project_kml = gis.content.get(kml_file[0].id)
DTE_webmap = WebMap(DTE_map)
DTE_webmap.add_layer(project_kml)
DTE_webmap.update() 

Tags (3)
0 Kudos
0 Replies