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.
I'm rebuilding the maps using version 4.12. With the new API, the line is displaying as solid green.
The symbology should be the same as the live site. Anyone else having a similar issue?
Ashley
Solved! Go to Solution.
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?
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?
Noah, there is no rendering set in the app. The service can be hit at: https://conservationgis.alabama.gov/adcnrweb/rest/services/Trails/MapServer.
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)
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
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.
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
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?
Yes. I'll give it a shot. Thanks!
Noah,
That did work. Thanks again!
Ashley
Great!