I’ve been having some problems with using Google’s satellite maps. Sometimes I’m getting drawing exceptions (“Parameter Not Valid”) when it’s drawing the tiles on the map (see attachement).  it happens with and without tile caching enabled. Is there anything I need to be watching out for that might cause this to happen?
Hi,
I’m using the GoogleMapsOverlay these settings:
        gmap.Name = “Google Satellite Map”
        gmap.ClientId = “removed for post<removed>”</removed>
        gmap.PrivateKey = “removed for post<removed>”</removed>
        gmap.MapType = GoogleMapsMapType.Hybrid
        gmap.TileMode = GoogleMapsTileMode.MultiTile
        gmap.TileWidth = 1024
        gmap.TileHeight = 1024
        gmap.DrawingExceptionMode = DrawingExceptionMode.DrawException
        gmap.TimeoutInSeconds = 60
Here’s the exception:
-		e	{ThinkGeo.MapSuite.Core.DrawingExceptionLayerEventArgs}	ThinkGeo.MapSuite.Core.DrawingExceptionLayerEventArgs
		Cancel	False	Boolean
		cancel	False	Boolean
-		Canvas	{ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas}	ThinkGeo.MapSuite.Core.GeoCanvas
-		ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas	{ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas}	ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas
		brushCache	Nothing	System.Collections.Generic.Dictionary(Of Long, System.Drawing.Brush)
		bufferImageForLabel	Nothing	System.Drawing.Bitmap
+		bufferImageForLevel01	{System.Drawing.Bitmap}	System.Drawing.Bitmap
		bufferImageForLevel02	Nothing	System.Drawing.Bitmap
		bufferImageForLevel03	Nothing	System.Drawing.Bitmap
		bufferImageForLevel04	Nothing	System.Drawing.Bitmap
+		canvasImageFormat	{00000000-0000-0000-0000-000000000000}	System.Guid
		ClippingArea	Nothing	ThinkGeo.MapSuite.Core.RectangleShape
		clippingArea	Nothing	ThinkGeo.MapSuite.Core.RectangleShape
		CompositingQuality	HighSpeed {1}	System.Drawing.Drawing2D.CompositingQuality
		compositingQuality	HighSpeed {1}	System.Drawing.Drawing2D.CompositingQuality
		CurrentScale	1128.4972199990259	Double
		currentScale	1128.4972199990259	Double
+		currentWorldExtent	{-8780549.47287214,4300392.20604861,-8780473.03603505,4300315.76921152}	ThinkGeo.MapSuite.Core.RectangleShape
+		CurrentWorldExtent	{-8780549.47287214,4300392.20604861,-8780473.03603505,4300315.76921152}	ThinkGeo.MapSuite.Core.RectangleShape
		dpi	96.0	Single
		Dpi	96.0	Single
+		drawingImage	{System.Drawing.Bitmap}	Object
		drawingQuality	HighSpeed {2}	ThinkGeo.MapSuite.Core.DrawingQuality
		DrawingQuality	HighSpeed {2}	ThinkGeo.MapSuite.Core.DrawingQuality
		fontCache	Nothing	System.Collections.Generic.Dictionary(Of Long, System.Drawing.Font)
		graphicsForLabel	Nothing	Object
+		graphicsForLevel01	{System.Drawing.Graphics}	Object
		graphicsForLevel02	Nothing	Object
		graphicsForLevel03	Nothing	Object
		graphicsForLevel04	Nothing	Object
		haloPenBitmap	Nothing	System.Drawing.Bitmap
		hasDrawn	False	Boolean
		HasKeyColor	True	Boolean
		Height	256.0	Single
		height	256.0	Single
		InterpolationMode	Default {0}	System.Drawing.Drawing2D.InterpolationMode
		interpolationMode	Default {0}	System.Drawing.Drawing2D.InterpolationMode
		isBitmap	True	Boolean
		IsDrawing	True	Boolean
		isDrawing	True	Boolean
+		KeyColors	Count = 0	System.Collections.ObjectModel.Collection(Of ThinkGeo.MapSuite.Core.GeoColor)
+		keyColors	Count = 0	System.Collections.ObjectModel.Collection(Of ThinkGeo.MapSuite.Core.GeoColor)
		localCanvasHeight	256	Integer
		localCanvasWidth	256	Integer
		MapUnit	Meter {3}	ThinkGeo.MapSuite.Core.GeographyUnit
		mapUnit	Meter {3}	ThinkGeo.MapSuite.Core.GeographyUnit
+		NativeImage	{System.Drawing.Bitmap}	Object
+		nativeImage	{System.Drawing.Bitmap}	Object
		penCache	Nothing	System.Collections.Generic.Dictionary(Of Long, System.Drawing.Pen)
		progressDrawingRaisedCount	1	Integer
		progressDrawingRaisingFrenquency	200	Integer
		smoothingMode	HighSpeed {1}	System.Drawing.Drawing2D.SmoothingMode
		SmoothingMode	HighSpeed {1}	System.Drawing.Drawing2D.SmoothingMode
		textRenderingHint	AntiAlias {4}	System.Drawing.Text.TextRenderingHint
		TextRenderingHint	AntiAlias {4}	System.Drawing.Text.TextRenderingHint
		waterMarkStringEvaluation	“removed for post<removed>”	String</removed>
		waterMarkStringUnlicensed	“removed for post<removed>”	String</removed>
		Width	256.0	Single
		width	256.0	Single
		worldToScreenFactorX	3.3491705012824609	Double
		worldToScreenFactorY	3.3491705012824609	Double
+		canvas	{ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas}	ThinkGeo.MapSuite.Core.GeoCanvas
+		Empty	{System.EventArgs}	System.EventArgs
-		Exception	{“Parameter is not valid.”}	System.Exception
-		System.ArgumentException	{“Parameter is not valid.”}	System.ArgumentException
		_className	Nothing	String
		_COMPlusExceptionCode	-532462766	Integer
+		_data	{System.Collections.ListDictionaryInternal}	System.Collections.IDictionary
		_dynamicMethods	Nothing	Object
+		_exceptionMethod	{Void .ctor(Int32, Int32, System.Drawing.Imaging.PixelFormat)}	System.Reflection.MethodBase
		_exceptionMethodString	Nothing	String
		_helpURL	Nothing	String
		_HResult	-2147024809	Integer
		_innerException	Nothing	System.Exception
		_ipForWatsonBuckets	1764675065	System.UIntPtr
		_message	“Parameter is not valid.”	String
		_remoteStackIndex	0	Integer
		_remoteStackTraceString	Nothing	String
+		_safeSerializationManager	{System.Runtime.Serialization.SafeSerializationManager}	System.Runtime.Serialization.SafeSerializationManager
		_source	“System.Drawing”	String
+		_stackTrace	{SByte()}	Object
		_stackTraceString	Nothing	String
		_watsonBuckets	Nothing	Object
		_xcode	-532462766	Integer
		_xptrs	0	System.IntPtr
+		Data	{System.Collections.ListDictionaryInternal}	System.Collections.IDictionary
		HelpLink	Nothing	String
		HResult	-2147024809	Integer
		InnerException	Nothing	System.Exception
		IPForWatsonBuckets	1764675065	System.UIntPtr
		IsTransient	False	Boolean
		m_paramName	Nothing	String
		Message	“Parameter is not valid.”	String
		ParamName	Nothing	String
		RemoteStackTrace	Nothing	String
		s_EDILock	{Object}	Object
		Source	“System.Drawing”	String
		StackTrace	"   at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)     at System.Drawing.Bitmap…ctor(Int32 width, Int32 height)     at ThinkGeo.MapSuite.Core.ExtentHelper.S0M=(Bitmap TEM=, Rectangle TUM=, RectangleF TkM=)     at ThinkGeo.MapSuite.Core.GoogleMapsLayer.6j4=(GeoCanvas 6z4=)     at ThinkGeo.MapSuite.Core.GoogleMapsLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers)     at ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)"	String
+		TargetSite	{Void .ctor(Int32, Int32, System.Drawing.Imaging.PixelFormat)}	System.Reflection.MethodBase
		WatsonBuckets	Nothing	Object
+		exception	{“Parameter is not valid.”}	System.Exception
Google Satellite Map Drawing Exceptions
Hi Mark, 
  
 Thanks for let us know your question. 
  
 Do you met this exception frequent? I thought that should be cause you set TileWidth = TileHeight = 1024, because from your exception message, it looks the finally tile size is 256x256, but not 1024x1024, and your pink tile looks is 256x256. 
  
 Could you please modify this value and do another test for it? 
  
 BTW, I found for WPF edition it should be gmap.TileType = TileType.MultipleTile but not  gmap.TileMode = GoogleMapsTileMode.MultiTile, please let me know your detail version. 
  
 Regards, 
  
 Don
Don,
  the exception doesn’t happen frequently.  We use the Google Map Premier API key and request 1024 x 1024 images - we also use the tile cache with the layer (code below).  Probably I’m not clear on the differences between TileMode of a googlemaps layer and TileType of a LayerOverlay so I’ve set the LayerOverlay tile type, height and width. I’ll see how it goes with that.
I’m still using WPF Production Build 8.0.0.351.  I know 9 is now available - I did have a quick lookat 9 but I’m going to hold off on moving over to that for a bit.
Thanks.
Hi Mark, 
  
 Please try to set small tile image for avoid network issue, I think which maybe cause cannot get response from remote server and shows pink tile. 
  
 BTW, do you only met that when you open tile cache or you can still met it when you close cache? 
  
 If you met the pink tile again, please copy the pink tile link and open it in browser to see whether you can get that image. 
  
 Regards, 
  
 Don
Thanks for information. Probably I’m not clear on the differences between TileMode of a googlemaps layer and TileType of a LayerOverlay so I’ve set the LayerOverlay tile type, height and width. I’ll see how it goes with that. 
 mobile number tracker with google map
Hi,
Here are cases between TileMode on layer and on LayerOverlay.
1. SingleTile on GoogleMapLayer, SingleTile on LayerOverlay: in this case, the requesting image width will be the same as the map width.
2. SingleTile on GoogleMapLayer, MultiTile on LayerOverlay: the requesting image width will be the same as the LayerOverlay Tile width, by default, as 256.
3. MultiTile on GoogleMapLayer, SingleTile on LayerOverlay: the requesting image width will be the same as the GoogleMapLayer tile width by default, as 512.
4. MultiTile on GoogleMapLayer, MultiTile on LayerOverlay (Default):  the requesting image width will be the same as the GoogleMapLayer tile width by default, as 512.
Please let us know if any questions.
Thanks.
Troy