Tile layers are instances of the TileLayer class. Tile layers use, at a minimum, a Descriptor and a TileRequestor to obtain and display map tiles from exterior sources. Tile layers can be created declaratively or in code.
<rim:TileLayer x:Name="MDNSTileLayer" FadeInDuration="0:0:0.5" ExcludeFromBackdrop="True" Descriptor="Sample">
<Requestors:MDNSMapTileRequestor BleedRatio="1.25" />
This declaration is nested within the MapModel declaration. See Using the RIM Controls for more details.
This is a typical tile layer declaration. The tile requestor is an MDNSMapTileRequestor. Because this tile layer is using an MDNSMapTileRequestor, its Descriptor is the ID of the map to render.
Use the x:Name syntax to assign the TileLayer a name used to reference it in code-behind. TileLayer has several useful properties, some of which are shown above.
Descriptor must always be set. Expected Descriptor values differ based on the TileRequestor in use. In some cases, string Descriptors declared in markup are replaced with other types of objects during tile layer initialization.
ExcludeFromBackdrop should be set true for all but the base map to avoid the performance impact of rendering complex backdrops as new data loads..
FadeInDuration is used to provide an attractive fade-in when images are loaded.
Opacity can be used when tile images are opaque but the base map needs to be visible through them.
A TileRenderer element is used in conjunction with a TileRequestor that returns vector data. The only such requestor is the MapDotNet Geometry tile requestor.
A TileRequestor element must be provided to retrieve the actual tile content.
Use the following links for more details about setting up tile layers for particular data sources.
BingMapsTileRequestor bing = new BingMapsTileRequestor();
TileLayer myTileLayer = new TileLayer("newLayerKey", bing);
myTileLayer.Descriptor = "r";
The TileLayer class defines a layer of tiled content presented within an IContentArea on your map. A TileLayer definition is added to your map via the map controller (e.g. myMap.MapController.AddTileLayer(...)) The MapView of the RIM control (e.g. accessed via myMap.MapView) has two pre-defined and pre-loaded (at construction) IContentAreas for displaying tiled content: ContentAreaMain and ContentAreaBackdrop. These IContentAreas hold presenter instances (QuadTileView) of rendered QuadTiles defined by their associated TileLayer.