user1581721 user1581721 - 1 year ago 98
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 ?


Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download