Skip to content

Commit

Permalink
fix: 🐛 fix missing function in arcade
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffJacobson committed Dec 16, 2024
1 parent 70e2c7b commit b4b1123
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/layers/MilepostLayer/arcade/LocateMP URL.arcade
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var urlBase = "";

// Split the Route ID into SR, RRT, and RRQ parts.
var routeParts = splitRouteId($feature.Route);
var attributes = Dictionary($feature)["attributes"];

// Construct the key value pairs for the query string.
var parts = [
Expand All @@ -16,6 +17,14 @@ var parts = [
["SRMP", Text($feature.SRMP,"#.##") + IIf($feature.Back == "B", "B", "")]
];

if (HasKey(attributes, "EndSrmp")) {
var mpText = Text(attributes.EndSrmp,"#.##");
if (HasKey(attributes, "EndBack") && attributes.EndBack == "B") {
mpText += "B";
}
Push(parts,["EMP", mpText]);
}

/**
* Detects if a tuple's value (element at index 1) is neither null nor empty.
* @param kvp - A tuple containing a key and a value.
Expand Down
4 changes: 1 addition & 3 deletions src/layers/MilepostLayer/arcade/WGS 1984 Coordinates.arcade
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@
var featureGeometry = Geometry($feature);

if (TypeOf(featureGeometry) == "Point") {
webMercatorToWgs1984(Geometry($feature))
} else {
webMercatorToWgs1984(Point($userInput))
webMercatorToWgs1984(featureGeometry)
}

0 comments on commit b4b1123

Please sign in to comment.