MapVectorItemCollection.InsertRange(Int32, IEnumerable<MapItem>) Method
Inserts multiple MapItems into the MapVectorItemCollection at the specified position.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v24.1.dll
NuGet Package: DevExpress.Wpf.Map
Declaration
Parameters
Name | Type | Description |
---|---|---|
index | Int32 | A zero-based index at which map items are inserted. |
items | IEnumerable<MapItem> | A map item collection. |
Remarks
The following code inserts three map items into the MapVectorItemCollection at the position with index 2:
<dxm:VectorLayer>
<dxm:VectorLayer.Data>
<dxm:MapItemStorage x:Name="MyMapItemStorage">
<!--...-->
</dxm:MapItemStorage>
</dxm:VectorLayer.Data>
</dxm:VectorLayer>
List<MapItem> items = new List<MapItem> {
new MapPushpin() { Text = "London", Location = new GeoPoint(51.507222, -0.1275) },
new MapPushpin() { Text = "Rome", Location = new GeoPoint(41.9, 12.5) },
new MapPushpin() { Text = "Paris", Location = new GeoPoint(48.8567, 2.3508) }
};
MyMapItemStorage.Items.InsertRange(2, items);
See Also