Data Providers
- 3 minutes to read
This document describes types of different data providers supported by the Map Control and provides information on how to use them.
When the Map control uses either the ImageTilesLayer to display image tiles from one of the imagery services, or the InformationLayer to implement GIS functionality, it is necessary to assign the appropriate Data Provider to this layer.
The following types are currently supported.
#Image Tiles Data Providers
To set one of the following data providers for an ImageTilesLayer object, you should assign chosen data provider to the ImageTilesLayer.DataProvider property.
-
Before using map images in the Bing Maps format, please obtain a valid Bing Maps key. To learn how this can be done, see How to: Get a Bing Maps Key.
The following instance shows a map provided by the Bing Maps web service.
For more information, refer to Lesson 1 - Connect to Bing Maps.
-
Before using map images in the OpenStreetMap format, please review the Copyright and License and Tile usage policy pages. To control which web resource should be used in your application as an OpenStreetMap data provider, assign specific values to the OpenStreetMapDataProvider.RoadTileUriTemplate and OpenStreetMapDataProvider.HybridTileUriTemplate properties. Note that by default, these properties are set to obtain data from the OpenStreetMap official web service.
The following instance shows a map provided by the OpenStreetMap data provider.
For more information, refer to Lesson 2 - Connect to OpenStreetMap.
Custom Image Data Provider
If you need to use another online imagery service, or to load image tiles from an intranet server, you can implement a custom data provider.
To do this, you should create a MapDataProviderBase class descendant and define a custom image tile source for it. This image tile source should be derived from MapTileSourceBase and provide a way to retrieve image tiles.
For more information on how to implement a custom map provider, see the How to: Connect to Another Image Tile Server example.
#GIS Data Providers
There are data providers that allow you to use the Bing Route, Bing Search and Bing GeoCode services. In this case, the current Data Provider is defined by the type of the object assigned to the InformationLayer.DataProvider property.
The following types are currently supported.
See the Geocode, Search and Routing topics to learn more.
Note that before using Bing services data providers, you need to obtain a valid Bing Maps key. To learn how this can be done, see How to: Get a Bing Maps Key.