Hi,
This question is in regards to configuring information in pop-ups on a web map in ArcGIS Online.
I have two layers and want one of the layers to show information on a pop-up that is related to the other layer.
For example, in layer A, I have a list of programs and what type of programs they are and also which building they belong to.
In layer B, are all the buildings.
I want to be able to click on a polygon in layer B and have it display all the programs and types of programs that are in layer A.
Essentially by clicking on a building, I want it to display all available programs within that building.
Any help on this is much appreciated! Thanks.
Assuming there's a shared field between them, this should be easy enough.
var id = $feature['building_id'] var programs = FeatureSetByName( $map, 'programs_layer_name', ['program'], false ) // filter program layer by matching building id var bldg_programs = Filter(programs, `building_id = '${$feature['building_id']}'`) var out_arr = [] // push each program into array for (var p in bldg_programs) { Push(out_arr, p['program']) } // return concatenated string return Concatenate(out_arr, '\n')
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.