Back to Devexpress

MiniMapLayerCollection Class

wpf-devexpress-dot-xpf-dot-map-6cc4bbb0.md

latest3.7 KB
Original Source

MiniMapLayerCollection Class

A collection of mini map layers.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public class MiniMapLayerCollection :
    MapElementCollection<MiniMapLayerBase>
vb
Public Class MiniMapLayerCollection
    Inherits MapElementCollection(Of MiniMapLayerBase)

The following members return MiniMapLayerCollection objects:

Remarks

An object of this class can be accessed using the MiniMap.Layers property.

Example

To add a mini map to the map, do the following.

  1. Create a MiniMap object and assign it to the MapControl.MiniMap property.
  2. Add MiniMapLayerBase class descendant object to the MiniMap.Layers collection to display them on the mini map.
  3. Customize the appearance of the mini map. Use the Height , Width and MiniMap.Alignment properties of the MiniMap object.
  4. Configure the mini map’s behavior. To do this, specify the MiniMap.Behavior property.
xaml
<dxm:MapControl.MiniMap>
    <dxm:MiniMap Height="210" Width="280" Alignment="TopRight">
        <dxm:MiniMap.Behavior>
            <dxm:FixedMiniMapBehavior ZoomLevel="3">
                <dxm:FixedMiniMapBehavior.CenterPoint>
                    <dxm:GeoPoint Longitude="146" Latitude="-38"/>
                </dxm:FixedMiniMapBehavior.CenterPoint>
            </dxm:FixedMiniMapBehavior>
        </dxm:MiniMap.Behavior>
        <dxm:MiniMapImageTilesLayer>
            <dxm:BingMapDataProvider BingKey="{Binding Source={StaticResource bingKey}}"/>
        </dxm:MiniMapImageTilesLayer>
        <dxm:MiniMapVectorLayer ShapeFill="Red">
            <dxm:ListSourceDataAdapter DataSource="{Binding Source={StaticResource data}, XPath=Ship}">
                <dxm:ListSourceDataAdapter.ItemSettings>
                    <dxm:MapDotSettings Size="10"/>
                </dxm:ListSourceDataAdapter.ItemSettings>
                <dxm:ListSourceDataAdapter.Mappings>
                    <dxm:MapItemMappingInfo Longitude="Longitude" Latitude="Latitude"/>
                </dxm:ListSourceDataAdapter.Mappings>
            </dxm:ListSourceDataAdapter>
        </dxm:MiniMapVectorLayer>
    </dxm:MiniMap>
</dxm:MapControl.MiniMap>

Inheritance

Object Collection<MiniMapLayerBase> ObservableCollection<MiniMapLayerBase> MapElementCollection<MiniMapLayerBase> MiniMapLayerCollection

See Also

MiniMapLayerCollection Members

DevExpress.Xpf.Map Namespace