Hi, we are testing the silverlight data visualization product, we can add a polygon layer, but if we put a points layer over the polygon layer, the points do not appear on the map, only the polygons, we have added another polygon layer and after the point layer, we can see the 2 polygon layers, polyline layers, but no point layers, how can we solve this?
We can make the points draws with the function, but now we have another problem, every time we run the proyect we get this error
Error: Unhandled Error in Silverlight Application Code: 4009 Category: ManagedRuntimeError Message: El elemento ya es un objeto secundario de otro elemento.
The element is a secondary object of another element, and no more refrences about to what object are the error message talking about
Can you confirm that this line "point.SymbolType = MapSymbolType.Diamond" is executed i.e. there are some points read from the Shapefile ? If it is, could you provide some sample code and the points layer ?
Private Sub MapLayer_Imported(ByVal sender As Object, ByVal e As Infragistics.Controls.Maps.MapLayerImportEventArgs) Handles Cabeceras.Imported If e.Action = MapLayerImportAction.End Then Dim layer = DirectCast(sender, MapLayer) For Each element In layer.Elements Dim point = TryCast(element, SymbolElement) If point IsNot Nothing Then point.SymbolType = MapSymbolType.Diamond End If Next End IfEnd Sub
Hi losoriomx,
I have created a development issue #61272 that should be resolved in the next service release. In the meantime you can apply the following workaround: Try to set points' symbol type:
Attach to the MapLayer(the layer that show points) "Imported" event.
private void MapLayer_Imported(object sender, Infragistics.Controls.Maps.MapLayerImportEventArgs e){ if (e.Action == MapLayerImportAction.End) { var layer = (MapLayer)sender;
foreach (var element in layer.Elements) { var point = element as SymbolElement;
if (point != null) { point.SymbolType = MapSymbolType.Bubble; } } }}
Please let me know if it works for you.
Regards, Ivan Kotev