user1581721 user1581721 - 2 months ago 30
Javascript Question

How to Color Polygons in Esri Shapes

Hi I have a Esri Map in Shape format divided into different sub regions (polygons). I wanted to access and select specific polygons using their Latitude and longitude vales and wanted to color it . Can anyone provide me the Code Esri Javascript API ?



You need to push your shape on ArcGIS Online, there is a cheap developper access account fee to do it.

Then, here is the link in javascript to render polygons in several colors based on an attribute (ID, or whatever), using a Renderer Using a UniqueValueRenderer

for getting the polygons on which apply the colors by a spatial query, you can use this technique : Using a Query from FeatureLayer