Overlaying Custom Map Content

Framework elements can be displayed within the Map control using map layers. Map layers allow you to control the location of the layer using GeoCoordinates and the z-index of layer content. You can add shapes, controls, and media such as images and even video to the map using map layers. Observe the following example:

<m:Map x:Name="map"    ...>    <m:Map.Layers>        <m:MapLayer>            <m:MapOverlay x:Name="currentLocationOverlay"                PositionOrigin="0.5,0.5">                <Ellipse Width="10" Height="10" Fill="Red" />            </m:MapOverlay>        </m:MapLayer>    </m:Map.Layers></m:Map>

A red circle is placed on the map using a MapOverlay.

The MapOverlay object ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.