A newer version of this page is available.
Switch to the current version.
OsmSearchDataProvider Class
Provides the search options using the Open Street Map service.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v18.2.dll
Declaration
public class OsmSearchDataProvider :
WebInformationDataProvider,
ISearchPanelRequestSender
Public Class OsmSearchDataProvider
Inherits WebInformationDataProvider
Implements ISearchPanelRequestSender
Examples
This example demonstrates how to add an image layer displaying map tiles from the OSM service and an information layer that searches for a place on the map using the OSM search service. It uses the following classes:
Class | Description |
---|---|
ImageLayer | Displays map images obtained from map image data providers. |
OpenStreetMapDataProvider | The class that loads map images from a web resource that provides data in the OpenStreetMap format. |
InformationLayer | A layer that is used to display additional information above the map. |
OsmSearchDataProvider | Provides the search options using the Open Street Map service. |
NOTE
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-use-the-openstreetmap-search-service-via-the-map-control-t629598
private void OnFormLoad(object sender, EventArgs e) {
mapControl.Layers.AddRange(new LayerBase[] {
new ImageLayer {
DataProvider = new OpenStreetMapDataProvider {
TileUriTemplate = "YOUR_WEB_SERVICE.com/{1}/{2}/{3}"
}
},
new InformationLayer {
DataProvider = new OsmSearchDataProvider { }
}
});
}
Inheritance
Object
InformationDataProviderBase
WebInformationDataProvider
OsmSearchDataProvider
See Also
Feedback