Hi,
I am using ArcGIS Javascript API version 3.31 for my desktop web application, we have a Feature Service layer of type esriGeometryPolyline.
The issue is that the arrow symbol from the layer, do not render properly when the layer is added to the map, instead thick lines display on the map.
The image below displays the rendering of the layer having an arrow symbol on the map.
(Fig1: NotWorkingLayer.png)
however, we have another feature service layer, having an arrow symbol, which works perfectly fine with the map.
(Fig2: WorkingLayer.png)
code to add feature layer on map:
var serviceUrl='URL to the service'
var featureLayer = new this.esri.FeatureLayer(serviceUrl, {
url: serviceUrl
mode: this.esri.FeatureLayer.MODE_SNAPSHOT,
outFields: ["*"]
});
map.addLayers([featureLayer ]);
Please find attached the layer samples.
Thanks.
Yashvit,
The issue you are encountering is that when a layer is added as a FeatureLayer in the map it is using clientside rendering and there is no support for Cartographic line symbols like lines with arrows indicating direction on the clientside. Most likely the other layer that you are showing in your image is being added to the map as a ArcGISDynamicMapserviceLayer and thus the rendering for that layer is done on the server which does support cartographic line symbols.
One workaround to render cartographic line symbols in feature services is to use CIMSymbols. I had to symbolise polyline with 2 parallel black lines (like railway). I ended up using CIMLineSymbol to solve my problem.