Answer:
We can change the color of the shape permanently by using the OnClick event in the Maps component. When we click on the shape again the IsShapeSelected argument, in the "OnClick" event, returns true. When we set the Cancel argument in "OnClick" event as true when the “IsShapeSelected” argument is true, selection will be restricted and the selection color will not be removed.
Find the sample to change shape color dynamically in Maps from
here.