Service symbology is rendering incorrectly

1117
9
Jump to solution
07-19-2019 10:38 AM
AshleyPeters
Occasional Contributor III

I'm using services that I've had published for years. On my live site, the symbology is displaying correctly (multi-colored line). The live site is using version 3.14 of the API.

Live site using 3.14 API

I'm rebuilding the maps using version 4.12. With the new API, the line is displaying as solid green.

Built in 4.12 API

The symbology should be the same as the live site. Anyone else having a similar issue?

Ashley

0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

Right, so you are seeing the expected behavior.

It sounds like in 3x you are bringing in all the layers as a ArcGISDynamicMapServiceLayer (which will take the MapServer as input, and thus all the layers), and in 4x you only bring in one layer as a FeatureLayer (which takes one layer from the MapServer as input). So if you used a MapImageLayer in 4x (which will take the MapServer as input, and thus all the layers) then you will see the exact same behavior in 3x and 4x.

Does that make more sense?

View solution in original post

9 Replies
Noah-Sager
Esri Regular Contributor

Is there any rendering set in the app, or is this how it looks like in the published service? If it's set in the code, can you share the 3x and 4x code snippets? Also, is the service used in this app publicly accessible for testing?

0 Kudos
AshleyPeters
Occasional Contributor III

Noah, there is no rendering set in the app. The service can be hit at: https://conservationgis.alabama.gov/adcnrweb/rest/services/Trails/MapServer.

0 Kudos
AshleyPeters
Occasional Contributor III
0 Kudos
Noah-Sager
Esri Regular Contributor

It looks like the other color that you see is actually a different layer. If we just look at just the trails layer, they look identical in 3x and 4x (both are solid green)

trails_layer

3x Trails

https://codepen.io/noash/pen/xvbNex

4x Trails

https://codepen.io/noash/pen/OKPYqx

If we display all layers in the MapService, we see what appears to be multi-colored lines, but I think are actually one line layer and some sort of line segment layer. They still look identical in 3x and 4x

all_layers

3x All Layers

https://codepen.io/noash/pen/MNYdxZ

4x All Layers

https://codepen.io/noash/pen/dxPErM

I would double-check and compare the code between 3x and 4x and make sure you are adding all the layers correctly in both apps.

0 Kudos
AshleyPeters
Occasional Contributor III

Noah,

The only difference I see between the two is that in the 3.x map that is live I have the layer that is displaying correctly brought in as an ArcGISDynamicMapServiceLayer. In the 4.x map that I'm working on, it is being brought in as a FeatureLayer. The line is multi-layer, either 2 or 3 layers, depending on what I needed for the line itself.

Ashley

0 Kudos
Noah-Sager
Esri Regular Contributor

Right, so you are seeing the expected behavior.

It sounds like in 3x you are bringing in all the layers as a ArcGISDynamicMapServiceLayer (which will take the MapServer as input, and thus all the layers), and in 4x you only bring in one layer as a FeatureLayer (which takes one layer from the MapServer as input). So if you used a MapImageLayer in 4x (which will take the MapServer as input, and thus all the layers) then you will see the exact same behavior in 3x and 4x.

Does that make more sense?

AshleyPeters
Occasional Contributor III

Yes. I'll give it a shot. Thanks!

AshleyPeters
Occasional Contributor III

Noah,

That did work. Thanks again!

Ashley

Noah-Sager
Esri Regular Contributor

Great!

0 Kudos