0 out of 1 rated this helpful - Rate this topic

MapLayer Class

Bing Services
Represents a map layer, which positions its child UIElement objects using geographic coordinates.

Namespace: Microsoft.Maps.MapControl
Assembly: Microsoft.Maps.MapControl (in microsoft.maps.mapcontrol.dll)
public class MapLayer : MapLayerBase, IProjectable
public class MapLayer extends MapLayerBase implements IProjectable
public class MapLayer extends MapLayerBase implements IProjectable
<UserControl x:Class="SilverlightTest1.ShapeSnippets"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:m="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"
    Width="1024" Height="768">
    <Grid x:Name="LayoutRoot" Background="White">
        <m:Map x:Name="TestMap" CredentialsProvider="Your Key" Mode="AerialWithLabels"  Grid.Column="0" Grid.Row="0">
            <m:Map.Children>
                <m:MapLayer>
                    <m:MapLayer.Children>
                      <m:MapPolygon Fill="Red" Stroke="Yellow" StrokeThickness="5"
                                  Opacity="0.7" Locations="20,-20 20,20 -20,20 -20,-20"/>
                      <m:MapPolyline Stroke="White" StrokeThickness="5" Opacity="0.7"
                                   Locations="10,-10 10,10 -10,-10 -10,10"/>
                    </m:MapLayer.Children>
                </m:MapLayer>
            </m:Map.Children>
        </m:Map>
    </Grid>
</UserControl>
    
Ee691328.note(en-us,MSDN.10).gifNote:
The position of child elements is based on the active projection of the parent map.


System.Object
   System.Windows.DependencyObject
     System.Windows.UIElement
       System.Windows.FrameworkElement
         System.Windows.Controls.Panel
           Microsoft.Maps.MapControl.MapLayerBase
            Microsoft.Maps.MapControl.MapLayer
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.