I have the following bug:
Google Maps is not correctly shown under some circumstances. It’s reproducable in a stand-alone demo:
string client = "XXX";
string privateKey = "XXX";
var googleOverlay = new LayerOverlay();
var googleLayer = new GoogleMapsLayer(null, client, privateKey)
{
//ProjectedTileCache = null,
TileWidth = 1024,
TileHeight = 1024,
TileMode = GoogleMapsTileMode.MultiTile,
IsGrayscale = true,
PictureFormat = GoogleMapsPictureFormat.Jpeg,
// WebProxy = new WebProxy(new Uri("http://localhost:8888"), false, null),
};
googleOverlay.Layers.Add(googleLayer);
MapControl.Overlays.Add(googleOverlay);
MapControl.ZoomLevelSet = new GoogleMapsZoomLevelSet();
MapControl.ZoomToScale(MapControl.ZoomLevelSet.ZoomLevel02.Scale);
If the TileWidth and TileHeight is set to 256, then no problem occurs.
But I have chosen the larger tile sizes to have less Google Logos.
With any other zoom level no problem occurs as well.
How can I work around this problem? I tried deactivating the zoom level, which would be acceptable. But I can’t figure out how.
MapControl.ZoomLevelSet.ZoomLevel02.IsActive = false;
MapControl.ZoomToScale(MapControl.ZoomLevelSet.ZoomLevel03.Scale);
Depsite setting the zoom level inactive I can go to the zoom level 02 using the mousewheel.