Select to view content in your preferred language

Arcade- '$Map Not Defined' inside Popup expression

92
2
Jump to solution
Wednesday
SteveCole
Honored Contributor

I'm clearly missing something here. Using Portal 11.3 and, for a map layer's popup content, I've added an Arcade Expression Block. When I attempt to access the $map profile variable inside that Arcade code block, Arcade barks and says that it's not defined. Through searching the forum, I did find a discussion about the variable profile context and that $map is only defined (available) in certain situations. I feel as though it should be accessible from where I'm trying to reference it. But clearly it's not.

The only $ profile variables available to me are $feature, $graph, and $userInput

Steve

0 Kudos
1 Solution

Accepted Solutions
SteveCole
Honored Contributor

Figured it out, and I don't believe this is documented (but I could be wrong). The layer I was using in my map was a MapServer service instead of a FeatureServer service. If I tried this with the FeatureServer service, I see the $ variables I would expect to find.

I was using the MapServer option because of the desire to preserve some hatch symbology used on a layer with M values. The more you know...

View solution in original post

0 Kudos
2 Replies
SteveCole
Honored Contributor

Figured it out, and I don't believe this is documented (but I could be wrong). The layer I was using in my map was a MapServer service instead of a FeatureServer service. If I tried this with the FeatureServer service, I see the $ variables I would expect to find.

I was using the MapServer option because of the desire to preserve some hatch symbology used on a layer with M values. The more you know...

0 Kudos
MichaelVolz
Esteemed Contributor

So does your response mean you need to access the object via a feature service as opposed to the mapservice?

0 Kudos