Skip to main content

MapVectorItemCollection.AddRange(IEnumerable<MapItem>) Method

Adds multiple MapItems to the end of the MapVectorItemCollection.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v24.1.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