Currently, we can create Hosted Feature layers that can be filtered in the definition stage by a manually drawn area, but we can't do it at the webmap level.
IDEA: Add spatial filtering as an option when authoring a webmap so that either manually defined areas or a selected feature (polygon) layer (with attribute expression as an option) can be used to filter data to be displayed and discoverable in the webmap. Make the filter option to be either inclusive (show features within) or exclusive (hide features within).
USE CASE: Where a contractor needs access to our internal system, we currently need to create hosted views of all relevant layers, once per contractor with the same spatial filter applied to each so that they can only see the data they are responsible for. By adding spatial filtering to a map, we could instead draw a polygon/s where intersecting features from layers in the webmap are displayed and all other features are hidden. This way, a contractor will only see the data relevant to their operations, and not those of other contractors. A polygon feature layer with attribute expression filter could be used to automate this further. Instead of 1 map per contractor with diferrent spatial filters, a polygon feature layer could be used to define the spatial filter (e.g. Contractor = 'Acme Co.') and those polygons become the defining boundaries. As polygons are added/modified/removed, the webmaps update dynamically. This means all webmaps for that contractor are consistent too (instead of requiring manual updates to all maps for that contractor).