Hi
I am quite new to Arcade and am stuck trying to create a custom popup in ArcGIS Online.
I have a Local Government Polygon layer for the state and three other point layers:
1. Gasworks
2. Landfill
3. Waste
I am trying to create a popup that will display the total number for each of the 3 sites in that selected Local Government polygon.
I have tried using the Count & Intersect functions but can only get it working for one of the 3.
Any help would be greatly appreciated!
Solved! Go to Solution.
var gasworks = FeaturesetByName(...)
var gasworks_in_state = Intersects($feature, gasworks)
var landfills = FeaturesetByName(...)
var landfills_in_state = Intersects($feature, landfills)
var waste = FeaturesetByName(...)
var waste_in_state = Intersects($feature, waste)
var point_counts = [
`gasworks: ${Count(gasworks_in_state)}`,
`landfills: ${Count(landfills_in_state)}`,
`waste: ${Count(waste_in_state)}`,
]
return Concatenate(point_counts, TextFormatting.Newline)
var gasworks = FeaturesetByName(...)
var gasworks_in_state = Intersects($feature, gasworks)
var landfills = FeaturesetByName(...)
var landfills_in_state = Intersects($feature, landfills)
var waste = FeaturesetByName(...)
var waste_in_state = Intersects($feature, waste)
var point_counts = [
`gasworks: ${Count(gasworks_in_state)}`,
`landfills: ${Count(landfills_in_state)}`,
`waste: ${Count(waste_in_state)}`,
]
return Concatenate(point_counts, TextFormatting.Newline)
That is awesome @JohannesLindner works perfectly
Thankyou so very much for that, I really appreciate the help!