From b4b1123d2db9c1acd218338d4a627af37f65e575 Mon Sep 17 00:00:00 2001 From: Jeff Jacobson Date: Mon, 16 Dec 2024 15:32:46 -0800 Subject: [PATCH] fix: :bug: fix missing function in arcade --- src/layers/MilepostLayer/arcade/LocateMP URL.arcade | 9 +++++++++ .../MilepostLayer/arcade/WGS 1984 Coordinates.arcade | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/layers/MilepostLayer/arcade/LocateMP URL.arcade b/src/layers/MilepostLayer/arcade/LocateMP URL.arcade index c487f111..a4f79db4 100644 --- a/src/layers/MilepostLayer/arcade/LocateMP URL.arcade +++ b/src/layers/MilepostLayer/arcade/LocateMP URL.arcade @@ -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 = [ @@ -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. diff --git a/src/layers/MilepostLayer/arcade/WGS 1984 Coordinates.arcade b/src/layers/MilepostLayer/arcade/WGS 1984 Coordinates.arcade index 1faa4597..5efae062 100644 --- a/src/layers/MilepostLayer/arcade/WGS 1984 Coordinates.arcade +++ b/src/layers/MilepostLayer/arcade/WGS 1984 Coordinates.arcade @@ -7,7 +7,5 @@ var featureGeometry = Geometry($feature); if (TypeOf(featureGeometry) == "Point") { - webMercatorToWgs1984(Geometry($feature)) -} else { - webMercatorToWgs1984(Point($userInput)) + webMercatorToWgs1984(featureGeometry) }