tke1081

How can I offset overlapping lines in Javascript API App?

Discussion created by tke1081 on May 22, 2012
Latest reply on Jul 8, 2016 by ppapadopoulosmarathondata-gr-esridist
Hi,

I need to find a way to offset overlapping lines that are in the same layer (layer 0 in my service) so they don't overlap each other.  I am able to offset the overlapping lines in ArcMap using the symbology settings and save my MXD document.  After I saved my MXD, I refreshed my map service in ArcCatalog and cleared the Rest API cache.  Then I previewed my map service in ArcCatalog the lines are offset.  However, when I go to my Javascript App, they are not offset and are overlapping.  My map service is coming into my javascript app as a feature service in snapshot mode.  Here is a sample of the code:

  roadMaintenance = new esri.layers.FeatureLayer("http://gis/ArcGIS/rest/services/RoadM/FeatureServer/0", {
          mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
          outFields: ["*"],
          infoTemplate: infoTemplate
        });

Any idea how I can carry these overlapping lines into my app and have them offset like I do in ArcMap/ArcCatalog?  I know they come to the client as graphic objects so I'm thinking that might be part of the issue.  I'm using ArcGIS Server 10 with SP4.  I've tested this is in Chrome, Firefox and IE with the same results (they are overlapping).  I want my app to show lines offset like the attached image.

Thanks for any help you can give!

Matt Stull
Mason County GIS Department
Shelton, WA

[ATTACH=CONFIG]14518[/ATTACH]

Outcomes