You can use the Contains method of the DynamicLayer.Items object to check that the item is already in the layer.
> objects =
Another cause of the ArgumentException with the "Value does not fall within the expected range" error could be in using the Name property of MapShape objects (MapPolyline, MapPolygon etc).
When you use the Name property then it is still registered in visual tree although it has been removed from the layer. And when you add the map polyline second time then the exception is thrown.
We have created a PITS issue to fix this problem in future releases.
You can track it using the following link:
In this case as workaround use the map polylines without using the Name property or use the Tag property instead.
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking
system and vote to affect the priority of the items