I have three point feature classes that overlay a building footprints (poly) feature class. All data is hosted on the portal, not registered with an enterprise gdb. I want the underlying building footprints to turn red when one or more of the intersecting point features has a certain attribute value. In other words, if one or more of the three points on a building has a status of "inactive", I want the underlying building footprint to turn red.
After some research, I have learned that you cannot symbolize a layer based on the attributes of another layer in the same map.
I'm looking for ideas on how I can make this happen.
Will a joined view layer help me accomplish this? These layers do have a common attribute. Would relating the layers and republishing be a better option? Will I need to rerun a calculation any time I want to see updated data? Will having this data in an enterprise geodatabase help me?
All ideas are appreciated.
Solved! Go to Solution.
Yes, you cannot / should not symbolize web map content this way dynamically. E.g. FeatureSets to symbolize by another layer aren't supported in Symbology profiles.
The reason for this is that the function would need to run for every feature to be symbolized. It's more processing than the map/device can handle. e.g. 400 trees = 400 times the function will run when panning the map. Pop-ups are OK, as it's one request on demand.
I would recommend updating an attribute value in the layer directly. There are a few ways you can do this:
Depending on your needs you can pursue the above to have this update occur immediately, scheduled, or as part of office routine. The webhooks/notebooks/pro/python will support running an intersect and updating the values for a point being present or not present.
Maybe create a geoprocess to create a derivative layer that joins the points to the building polys and populates a new field based on if a joined point is inactive. You could then symbolize on that new field.
I'm sorry I don't know the exact method, but I believe you should look into "FeatureSetBy" I think you could start by selecting only the points that have the value you want then select only the polygons that intersect those point.
Yes, you cannot / should not symbolize web map content this way dynamically. E.g. FeatureSets to symbolize by another layer aren't supported in Symbology profiles.
The reason for this is that the function would need to run for every feature to be symbolized. It's more processing than the map/device can handle. e.g. 400 trees = 400 times the function will run when panning the map. Pop-ups are OK, as it's one request on demand.
I would recommend updating an attribute value in the layer directly. There are a few ways you can do this:
Depending on your needs you can pursue the above to have this update occur immediately, scheduled, or as part of office routine. The webhooks/notebooks/pro/python will support running an intersect and updating the values for a point being present or not present.
I think I found a way to do this without having to use webhooks, notebooks, or python.
I created a joined hosted feature layer view from a building footprints layer and the point feature class that contains the "status" field. Note that you can only do this if the layers you want to join have a field in common. In my case, they do.
The point feature class is editable, so a user can change a point's status to "inactive" and that change will be reflected automatically in the joined view layer. I then symbolized the joined view layer based on the status field, and building footprints that are joined with an inactive point turn red. Woohoo!