Select to view content in your preferred language

Intersecting Selected Feature with one Buffer Zone in Pop-Up

475
1
Jump to solution
03-14-2024 12:35 PM
ClintHewlett
New Contributor

I am trying to create an expression that will show whether or not a selected parcel polygon intersects with a buffer polygon in my experience builder. My understanding is that when I call $feature in an expression it is referring to the currently selected feature. My assumption then is that when using Intersect() i can compare a selected feature with the entirety of my buffer polygon using the following code:

 

if(Boolean(Intersects($feature, FeatureSetByName($map, "Dispensary Buffer")))){
  return 'This parcel is not eligable for development.'
} else {
  return 'This parcel may be eligable for development. Please contact City of Columbus Building and Zoning Services'
};
 
 
Am I misunderstanding the scope of $feature?
1 Solution

Accepted Solutions
ClintHewlett
New Contributor

It seems my issue was that FeatureSetByName() returns a feature set and I needed to access the feature within that feature set. Using First(FeatureSetByName($map, "Dispensary Buffer")) gives Intersects two feature geometries and returns a boolean.

View solution in original post

0 Kudos
1 Reply
ClintHewlett
New Contributor

It seems my issue was that FeatureSetByName() returns a feature set and I needed to access the feature within that feature set. Using First(FeatureSetByName($map, "Dispensary Buffer")) gives Intersects two feature geometries and returns a boolean.

0 Kudos