I am able to offset the overlapping lines in ArcMap using the symbology settings and save my MXD document.
Most symbol types can be used with a feature service; however, in some cases, the symbols may be downgraded.
For line layers, simple line symbols are supported. If other symbols are used, the feature service downgrades them to simple line symbols. For example, a cartographic line symbol in the map document may be drawn as a simple solid line in a feature service client. Also, if a line symbol has multiple layers, the feature service considers only the top layer.
Has anyone found a solution to this problem? Editing the geometry to be offset before publishing the feature service will not work for me because the amount of offset needed will vary depending on zoom level. Maybe there is a way to offset the SVG (dx, dy?) graphic after determining if two or more features overlap? I'm not yet savvy enough with SVG to code this myself (and I'm not sure how this approach would impact performance since these calculations would have to be done every time a user zooms in or out). For now, I'm thinking about adding labels so that when two features overlap and appear as 'one', the user will at least see two labels indicating two features.
Ok folks, I've figured out a way to do this. It requires the geometryEngine module that wasn't available when this thread was started. It has some hiccups for what I want to do with it (offset lines that partially overlap and are not completely coincident within the same featureLayer) but as long as overlapping lines or portions of lines are coincident, it will work. You may have to tweak the code for your situation.
ArcGIS JavaScript Offset Lines - JSFiddle
Also, you may need to play around with the offset distance mulitplier in the calcOffset function depending on line widths (I used 3 here):
function calcOffset() {
return (map.extent.getWidth() / map.width) * 3;
}
Cheers
Unfortunately, if you pan the map without zoom in/out, the offset will be larger.
a version with out offset run at every time can be found here