I am setting a scale dependant renderer for a FeatureLayer of line geometry type, so that in samller scale it can shown as a marker symbol and in higher scale it can be shown as a Line symbol. When I tried to apply a SimpleMarkerSymbol to this layer , it is not working. I followed same strategy for a Polygon type feature layer and found it is working perfectly. I am using ArcGIS JS API 3.11
I do not know what is the problem with line feature layer, Can anybody help with a solution.
Thanks
Shabeerali
This works for polygons, haven't tried with lines though. You can set the renderer to display markers.
JS Bin - Collaborative JavaScript Debugging
var layer = new FeatureLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5", { outFields: ["*"], infoTemplate: new InfoTemplate("${STATE_NAME}") }); var markerSym = new SimpleMarkerSymbol(); markerSym.setColor(new Color("#78B378")); markerSym.setOutline(markerSym.outline.setColor(new Color([133,197,133,0.75]))); var renderer1 = new SimpleRenderer(markerSym); layer.setRenderer(ren
Already tried for polygons and able to represent with Marker symbols, but for line while I am setting renderer with Markersymbol it not appearing, Can You try your example with line?
this is still not working after 4years. Did you resolve it Ali?