Hello all,
I am pretty new to the new Map Viewer, so maybe I just missed a step.
I am customizing the pop-up in the new Map Viewer using Arcade. The expression works when I hit Test, but the Pop-up in the new Map Viewer only briefly display a spinning circle and doesn't display the message created by the expression. I have tried re-doing it, restarting the map viewer, but it doesn't work. When I put the same expression in the classic Map Viewer, it immediately works. Any ideas? Any assistance is greatly appreciated.
Here is the expression:
var LocCodes = {
"incorp":"incorporated city",
"unincorp":"unincorporated community"
}
var Loc = $feature.loctype
var LocDesc = LocCodes[Loc]
var SumCases = sum($layer, "confirmedcases")
var FilterCases = sum(Filter($layer,"loctype=@Loc"),"confirmedcases")
Return Proper($feature.name) + " is an " + LocDesc + " located in San Diego County. It recorded " + $feature.confirmedcases + " COVID cases as of Jan, 25, 2022. This represents " + Round($feature.confirmedcases/FilterCases*100,2) + "% of the total cases recorded in all of the " + LocDesc + " jurisdiction, and " + Round($feature.confirmedcases/SumCases*100,2) + "% of the total cases recorded for the entire county."
Expression tested fine in the new and classic viewer
New viewer pop-up fails to update with the message from the expression
Classic viewer pop-up updates with the message from the expression
Solved! Go to Solution.
Hello Wing,
I think you have to do one extra step and add the expression field in as a "field" to you pop-up in the New Viewer.
Hello Wing,
I think you have to do one extra step and add the expression field in as a "field" to you pop-up in the New Viewer.
Thank you Amada. I figured out what I was doing wrong. I added my Arcade Expression using the +Add content icon instead of Manage Expression. Once I went through Manage Expression and added my expression there, I was able to see my expression in the Fields list and include it in my pop-up. Thanks!
This is exactly what I was doing wrong....thank you.