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.AddRange(IEnumerable<MapItem>) Method

Adds multiple MapItems to the end of the MapVectorItemCollection.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v24.2.dll

NuGet Package: DevExpress.Wpf.Map

#Declaration

public void AddRange(
    IEnumerable<MapItem> items
)

#Parameters

Name Type Description
items IEnumerable<MapItem>

A map item collection.

#Remarks

The following code adds three map items to the end of the MapVectorItemCollection:

<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.AddRange(items);
See Also