Hello,
I'm migrating to the new version of MapSuite today (from version 4.0.64.0 to version 5.0.0.55).
I can't find the overridable method GetBitmapCore(UriTileArguments args) fom the class UriTile any more.
In the following sample code, I overrided the GetBitmapCore method in order to create a specific HttpRequest with a windows authentification and to change the opacity of the Tile.
public class CustomWmsUriTile : UriTile
{
private float _opacity;
public CustomWmsUriTile(float opacity)
{
_opacity = opacity;
}
protected override Bitmap GetBitmapCore(UriTileArguments args)
{
HttpWebResponse response = null;
Bitmap bitmap = null;
try
{
HttpWebRequest request = SingletonManager.Instance.Get<ServiceFactory>().CreateHttpWebRequestForGis(args.Uri.ToString());
request.Proxy = args.WebProxy;
response = (HttpWebResponse) request.GetResponse();
bitmap = new Bitmap(response.GetResponseStream());
if (_opacity == 1)
return bitmap;
return ImageUtils.GetNewImageWithOpacity(bitmap, _opacity);
}
finally
{
if (response != null) { response.Close(); }
}
}
}
Please can you say me how I should change my code in order to make it work again ?
Many thanks,
Guillaume.