Managing and providing access to maps is essential to the success of the organization. However, you may have a lot of shared maps used in for editing in the office as well as the field. Or perhaps there are some maps from previous field operations that are no longer needed by your mobile workers. Let’s take a look at how you can control what maps your mobile workers see in Collector.
Limiting the list of available maps
Collector uses web maps. As the size of your organization grows, many web maps meet the criteria for use in Collector. What makes a map available in Collector? There are two conditions a web map must meet to be used in Collector:
- Contain one or more editable feature layers
- Shared with a group that you are a member of
While this certainly makes it easy to share a map with your mobile workers, not every map is designed to be used in Collector. There are many reasons why a given web map shouldn’t be shown in Collector. Some common cases include where a map has been superseded by a new version, or that it is designed for office editing only via a web application.
Late last year, we added support for a new setting that puts you in control of the maps your Collector users see. Let’s take a look.
Before we look at how to remove maps, let’s look at an example set of maps available to a user in Collector.
Now let’s remove the Bike Infrastructure map from Collector.
Exclude a web map from Collector
To hide a given map from Collector, head to the web map’s Settings, and navigate to the Web Map section. There you’ll find a new setting, Use in Collector for ArcGIS. This setting is only available if the web map has an editable layer.
In this example, we’re going to hide the Bike Infrastructure map from Collector since it’s no longer an active data inventory project.
Uncheck Use in Collector for ArcGIS and click Save.
Head back to Collector, refresh your list of maps and notice that the web map is no longer available.
This option is honored in both Collector for ArcGIS as well as Collector Classic.
Exclude multiple maps from Collector using Python
What if we have lots of maps we don’t want to see in Collector? We can use the ArcGIS API for Python to simplify and automate this task for one or more web maps.
The function below updates some of the typeKeywords associated with the web map item, effectively making the same changes as the option in the web map settings we used earlier.
The following Python function takes two parameters: a web map item, and a boolean indicating whether we want to hide or show a given web map in Collector.
This function works in both a traditional Python script, or in a Jupyter notebook. Change your mind and want to make a set of maps available? Just change the last parameter and the maps are available to Collector.
Let’s look at a couple of ways you could utilize this function to update a series of maps. Perhaps you have a set of maps with a specific tag indicating it is for office use only. Perform a quick search as shown in the example below and use our function to update the Use in Collector setting.
You can also update items in a specific group that have been marked as deprecated.
Wrapping up and next steps
This new capability offers an easy way for GIS administrators to exclude individual maps from Collector to ensure that field crews are performing their collections or inspections using the right maps, as well as simplifying their experience by excluding maps that are intended for other purposes.
This and other examples of using Python to aid in your field data collection activities are on our Github repo.
Using the ArcGIS API for Python, you can automate this and many other tasks to support your data collection workflows.