Skip to main content
A newer version of this page is available. .

OpenStreetMapDataProvider.TileUriTemplate Property

Gets or sets a template that is used to obtain image tiles from the current OpenStreetMap provider.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v18.2.dll

Declaration

public string TileUriTemplate { get; set; }

Property Value

Type Description
String

A String containing the template Uri.

Remarks

Important

Use of this property assumes that an OSM Tile Server is used. This means that all tiles for all zoom levels can be loaded. In a case when not all tiles are available, design a custom tile provider.

Template placeholders will be replaced with the following values on a tile request.

  • {0} - A sub-domain of the OSM server.
  • {1} - The current zoom level.
  • {2} - The horizontal (X) index of the requested tile.
  • {3} - The vertical (Y) index of the requested tile.

Note

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, you should assign specific values for the OpenStreetMapDataProvider.TileUriTemplate property. Note that by default, this property is set to obtain data from the OpenStreetMap official web service.

Note that if the TileUriTemplate property contains an invalid URI, the layer to which the provider is assigned raises the LayerBase.Error event.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TileUriTemplate property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also