Hi,
we get the map-url by using an object, which extends the TiledMapSource object by Telerik, and its GetTile()-method.
protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
{
int zoomLevel = this.ConvertTileToZoomLevel(tileLevel);
String url = String.Format(@"http://{0}:{1}/WMS/GetTile/xmap-ajaxbg/{2}/{3}/{4}.png", m_MapProviderSettings.URL,
m_MapProviderSettings.Port, tilePositionX, tilePositionY, zoomLevel);
url = ProtocolHelper.SetScheme(url);
return new Uri(url);
}
We have a map provider that is hosted by a Microsoft cloud, we have to authenticate by a username and password.
We tried to add the username and password to the url string:
String url = String.Format(@"https://USERNAME:PASSWORD@{0}:{1}/WMS/GetTile/xmap-ajaxbg/{2}/{3}/{4}.png", m_MapProviderSettings.URL, m_MapProviderSettings.Port, tilePositionX, tilePositionY, zoomLevel);
…but the login failed.
For calling other services in the cloud we have to set the credentials at the service proxy.
Proxy.Credentials = new NetworkCredential(Username, Password);
Regards,
Christopher