Select to view content in your preferred language

Map viewer styles based on two categorical attributes

06-07-2024 06:41 AM
Occasional Contributor

I want to display symbology of a point feature class using two categorical attributes. One attribute for color and one attribute for shape.

For context, this is a parking space inventory feature class. I'd like the service vehicle spots represented by an "S" and the color of the "S" will be determined by the type of lot this space is located in (this is an attribute in the same feature class).

I know I can set this up easily in ArcGIS Pro and overwrite the feature service, but I want to do it through Portal's Map Viewer because this symbology request is for a specific web map/user. I don't want to overwrite the whole service because it's used in other maps and other users may not like this symbology.

Map Viewer doesn't seem to allow me to use two categorical attributes for symbology. It wants to use one of the attributes for size of the symbol. See screencap.

Has anyone successfully used 2 categorial attributes to  style a layer in portal map viewer?




0 Kudos
2 Replies
Regular Contributor

You can use Arcade to define the symbology using the expression for the two different attributes. This should give you what you need.

For example:

var Space = $feature.<insert fieldname>
var Color = Null
if( Space == <some value> ){ Color = "Red" }
else if( ( Space == <some other value> ){ Color = "Blue" }
return Color

As for the symbol you may want to check out the link below.

A New Way To Add Web Styles in Map Viewer (

These may only help with the latest release of map viewer, but worst-case scenario you simply republish the layer from pro. The more custom symbol might be tricky, depending on the version of map viewer, but it should suffice for what you need.

0 Kudos
Regular Contributor

It just dawned on me but another solution would be to use Labeling in addition to using arcade which might be a better option.

0 Kudos