RadMap provides support for single image provider through the UriImageProvider class besides the built-in support for tiled (MultiScaleImage) providers like BingRestMapProvider and OpenStreetMapProvider.

Assuming that images with names osm_10.png, osm_11.png, ..., osm_14.png are embedded as resources within the application assembly, you can initialize the UriImageProvider like this:

<telerik:RadMap x:Name="RadMap1"  
                Center="42.72481708629, 23.3176519378416" 
        <telerik:UriImageProvider GeoBounds="42.786, 23.17, 25, 14" Uri="/MyApplication;component/osm_{zoom}.png" /> 
The UriImageProvider provides support for the following specific properties:
  • Uri - Gets or sets the uniform resource identifier (URI) for the image location.

Example: http://c.tile.openstreetmap.org/7/70/43.png (© OpenStreetMap contributors).

If you have separate image for every zoom level then the URI string must contain {zoom} placeholder. This part will be replaced with the actual zoom level when the image is requested (e.g."/MyApplication;component/MapImages/image_{zoom}.png").

  • BaseAddress - Gets or sets the uniform resource identifier (URI) of the base address for the image location.

  • ZoomNumericFormat - Gets or sets numeric format string will be used to replace {zoom} placeholder. For example "D2" will replace {zoom} placeholder with 2 digits integer (01, 02, ..., 19). The default value is null and it produces simple integer without paddings (1, 2, ... 9, 10, ... 19).

Note that the UriImageProvider cannot be used as a master provider in a multi-provider scenario and always should be restricted within geographic region (i.e. you need to set the UriImageProvider.GeoBounds property).

In this article
Not finding the help you need? Improve this article