Good afternoon,
I’m looking for a way to show the nearest parking location (point layer) when clicking on a restaurant (point layer). I’d like the pop‑up in ArcGIS Pro to display a clickable URL or an Arcade expression that zooms to the nearest parking feature. The layer restaurant already includes a NEARME field that stores the ID and distance of the closest parking point.
Tried thos code as an expression and it does not work:
var parkingOID = $feature.NEAR_FID;
if (IsEmpty(parkingOID)) {
return "No parking location found.";
}
var layer = FeatureSetByName($map, "Parking_Locations", ["OBJECTID"], false);
var parkingFeature = First(Filter(layer, "OBJECTID = " + parkingOID));
if (IsEmpty(parkingFeature)) {
return "Parking location not found in layer.";
}
// Build a link that auto-selects/highlights the parking feature
var url = "arcgis://select/?layer=Parking_Locations&objectid=" + parkingOID;
return "Select Parking Location: " + url;