From the course: Python Scripting Using the ArcGIS API for Python

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Adding and removing layers from a map widget

Adding and removing layers from a map widget

- [Instructor] If I want to write Python code to work with web services, I can create a map widget in ArcGIS Notebooks and use it to display the services I'm working with. I can also use those services, once I've brought them into my script, as input to geo processing tools and for all sorts of analysis. Let's see how to go grab some data from a web service and drop it on a map. I've got a notebook open already, and I've run this first cell that connects me to ArcGIS online. Let me add another cell, and I'll add the code to create the map widget. I'm going to name my map object just M, and I'll send her my map on a place called Thurston County in the state of Washington here in the US. So I'll put Thurston County as my search string. Thurston County, Washington to be clear. And then I'll display the map. Okay, so now I have a map centered on Thurston County. Let's see how to grab some layers from ArcGIS online, or Portal, or just a shared service sitting out there somewhere that I can…

Contents