This is the code that I have written till now.
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/MapImageLayer",
"esri/renderers/SimpleRenderer",
"esri/symbols/SimpleFillSymbol",
"dojo/domReady!"
],
function(
Map, MapView, MapImageLayer, SimpleRenderer, SimpleFillSymbol
) {
var permitsLyr = new MapImageLayer({
url: "http://apps.geoportal.icimod.org/ArcGIS/rest/services/Nepal/District/MapServer",
sublayers: [
{
id: 1,
visible: true,
},
{
id: 0,
visible: true,
}
],
});
/*****************************************************************
* Add the layer to a map
*****************************************************************/
var map = new Map({
// basemap: "dark-gray",
layers: [permitsLyr]
});
var view = new MapView({
container: "viewDiv",
map: map
});
/*****************************************************************
* Animate to the layer's full extent when the layer loads.
*****************************************************************/
permitsLyr.then(function() {
view.goTo(permitsLyr.fullExtent);
});
});
Now, I would like to change default renderer given in the District - Nepal/District as
Drawing Info:
Simple Fill Symbol:
Style: esriSFSSolid, Color: [Undefined]
Simple Line Symbol:
Style: esriSLSSolid, Color: [78, 78, 78, 255], Width: 1
Label:
How do I change the default color and style for it? Also, using its attribute "DIST_CODE", I also want to apply different color for different polygons.
I am new to this field. So, help me out.