Back to Devexpress

MapImageDataProviderBase.WebRequest Event

windowsforms-devexpress-dot-xtramap-dot-mapimagedataproviderbase.md

latest4.1 KB
Original Source

MapImageDataProviderBase.WebRequest Event

Occurs when a Map control sends a request to an external web service.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public event MapWebRequestEventHandler WebRequest
vb
Public Event WebRequest As MapWebRequestEventHandler

Event Data

The WebRequest event's data class is MapWebRequestEventArgs. The following properties provide information specific to this event:

PropertyDescription
AcceptGets or sets the web request’s Accept header.
CredentialsGets or sets authentication information for the map web request.
EncodingSpecifies the character encoding of the map web request.
HeadersGets or sets a collection of web headers associated with a request or response.
ProxyGets or sets proxy information for the request.
RefererGets or sets the Referer field of the HTTP header.
UriGet the URI of the Internet resource associated with the map web request.
UseDefaultCredentialsGets or sets a value that indicates whether to use the default authentication information for the map web request.
UserAgentGets or sets the value of the user-agent HTTP header.

The following code snippets (auto-collected from DevExpress Examples) contain references to the WebRequest event.

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.

winforms-map-connect-to-openstreetmap/CS/ConnectToOpenStreet/Form1.cs#L34

csharp
provider.WebRequest += OnWebRequest;
}

winforms-map-use-openstreetmap-search-service/CS/OsmSearchSample/MainForm.cs#L17

csharp
imageLayer.DataProvider = dataProvider;
dataProvider.WebRequest += DataProvider_WebRequest;

winforms-map-connect-to-openstreetmap/VB/ConnectToOpenStreet/Form1.vb#L31

vb
provider.TileUriTemplate = "https://{0}.tile.MyCustomOSMProvider.org/{1}/{2}/{3}.png"
    AddHandler provider.WebRequest, AddressOf OnWebRequest
End Sub

See Also

MapImageDataProviderBase Class

MapImageDataProviderBase Members

DevExpress.XtraMap Namespace