Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.dll

NuGet Package: DevExpress.Wpf.Map

#Declaration

public void InsertRange(
    int index,
    IEnumerable<MapItem> items
)

#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