I want to show multiple polygons on a single map

385
1
10-08-2021 04:14 AM
deepakvashisth1
New Contributor

Hi everyone, 
I have multiple checkbox in my form which contains different polygons on a layer in map. When I click on a particular checkbox, the selected checkbox polygon should be highlighted on map.

I want to show multiple polygons. Please suggest me how to do that.

can anyone share me code for that.

0 Kudos
1 Reply
BlakeTerhune
MVP Regular Contributor

The highlight method of FeatureLayerView will keep highlighting additional features each time it's called. To remove the highlight, you can use the remove() method of the "highlight handler" that's returned from calling highlight().

You can see this in action with this sample app. Just comment line 86 to see it highlight more features as you click.

0 Kudos