The requested page is not available for the requested platform. You are viewing the content for Default platform.

MapItemsLayerBase.InitialMapSize Property

Gets or sets the size of a map shape tile to provide a map projection.

Namespace: DevExpress.UI.Xaml.Map

Assembly: DevExpress.UI.Xaml.Map.v19.1.dll

Declaration

public Size InitialMapSize { get; set; }
Public Property InitialMapSize As Size

Property Value

Type Description
Size

A Size value containing the size of the map tiles that correspond to the zero zoom level.

Remarks

Use the InitialMapSize property to get a map projection (e.g., Lambert, Behrmann, Tristan Edwards equal map projections) and avoid distortions of a vector layer's elements on a plane.

Examples

To customize equal-area projection, do the following.

<Page xmlns:Map="using:DevExpress.UI.Xaml.Map" 
    x:Class="MapControl_CustomProjections.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:MapControl_CustomProjections"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" Loaded="Page_Loaded">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Map:MapControl x:Name="mapControl">
            <Map:VectorFileLayer>
                <Map:ShapefileReader>
                    <Map:MapPackageFileSource FileName="Assets\Countries.shp"/>
                </Map:ShapefileReader>
            </Map:VectorFileLayer>
        </Map:MapControl>
        <ListView Name="listView"
                  HorizontalAlignment="Right" VerticalAlignment="Top" 
                  Header="Projection Ratio:"
                  ItemsSource="{Binding ProjectionRatios}" 
                  FontSize="26.667" Margin="20" BorderThickness="2" BorderBrush="White"
                  MinWidth="250"
                  SelectionChanged="ListView_SelectionChanged">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}" TextAlignment="Left" Margin="8" />
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

    </Grid>
</Page>
See Also