Select to view content in your preferred language

How do I filter a points feature layer by a polygon and keep the live data feed in AGOL map?

583
8
04-12-2024 02:17 PM
JessicaFish
New Contributor II

I am using ArcGIS Online to create a map that will be used to view project locations (Primary Point TEST) that fall within a larger polygon (Chinook ESU Boundary). The project points come from a REST (end point) service that was made into a feature layer (not hosted) via the URL. The polygon layer is a single large polygon that was originally a shapefile published from ArcGIS Pro to my AGOL account. 

I've tried this process with the point layer being a hosted feature layer, but it does not update automatically as projects are created/removed. It is static and I'm looking for it to be dynamic. 

The main goal is to ensure that the points layer is still updated as project points are added to/removed from the rest service. Additionally, as new points are added into the REST service, we want those to be also filtered by the Chinook ESU polygon so project points outside of the polygon do not show on the map. 

The current polygon layer (blue): 

JessicaFish_1-1712956471578.png

 

Example of points we would want on the map (highlighted green with check mark) and those we don't want to show on the map (flagged red with 'x'). 

JessicaFish_0-1712956103210.png

Thank you so much for helping!!

0 Kudos
8 Replies
RussRoberts
Esri Notable Contributor

If you are using Map Viewer instead of Map Viewer Classic you could use blend modes to visually filter the points that fall outside the project.  You would use a group layer and place the project boundary layer above the point layer. Then use the blend mode Destination atop on that project layer will "clip" the data to within the boundary visually.

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/blend-modes-for-thematic-maps/ 

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/how-to-style-a-media-layer-using-eff...

JessicaFish
New Contributor II

Thank you for your response. I did try this, and it is not what I am looking to do (unless I am not setting up correctly?). This clipped the basemap to the Chinook ESU polygon boundary. 

JessicaFish_0-1713212144669.png 

The goal is to show a map of project points, and only points that fall within the boundaries of the polygon. I don't want or need to show the polygon boundary outline. 

Should I be using a sort of spatial arcade to filter out the points that aren't within the polygon? Or is there another tool available? 

 

0 Kudos
RussRoberts
Esri Notable Contributor

Can you try Destination In on the polygon layer instead of Destination atop? 

0 Kudos
JessicaFish
New Contributor II

I tried with Destination In and still no luck. Here is what I see: 

JessicaFish_0-1713213728526.png

 

0 Kudos
RussRoberts
Esri Notable Contributor

can you share your map and I can take a look. thanks! 

0 Kudos
JessicaFish
New Contributor II

Yes, thank you! Let me know if you are having trouble accessing. 

TEST Priority Chinook Map (arcgis.com)

0 Kudos
JessicaFish
New Contributor II

I'm sorry that I no longer am able to share the map at this time per agency protocol. I do really appreciate your help with my question. 

0 Kudos
JessicaFish
New Contributor II

Thank you for your help. We ended up creating a spatial view for the map.