Can not define different VisibleColors for two different LocationViewsheds respectively

408
2
09-25-2023 05:16 AM
AlexanderZhang
New Contributor III

Hi, all 

   I use LocationViewshed and AnalysisOverlay on a scene, i want to create two LocationViewsheds for the two locations A and B, and define different VisibleColors for the two LocationViewsheds respectively, for example, the area visible from the Location A is rendered in green, and the area visible from the Location B is rendered in yellow. But the VisibaleColor is a static property shared by all instances of the LocationViewshed, how can I achieve the functionality I want?

 

thanks

Alexander 

0 Kudos
2 Replies
KoushikHajra
Esri Contributor

Hello @AlexanderZhang,

Thank you for reaching out to us. Unfortunately, what you're trying is not possible at the moment using our API since the property is static. If you have any further questions, please feel free to reach out to us. 

Regards,

Koushik

0 Kudos
ThadTilton
Esri Contributor

You could achieve this using a geoprocessing task to create the individual viewsheds and display them as graphics overlays. It would be a much less dynamic user experience, but it would work fine for some use cases. See the .NET sample for viewshed with a geoprocessing service: https://developers.arcgis.com/net/winui/sample-code/analyze-viewshed-geoprocessing/

 

Perhaps even a hybrid approach, where one viewshed comes from the geoprocessing task (displayed as graphics) and the other is from the analysis overlay?