ThinkGeo.com    |     Blog    |     Wiki    |     Support

WPF Google Maps Margin

I have downloaded your demo app (https://github.com/ThinkGeo/OverlaysSample-ForWpf), because I want to experiment with Google Maps and then decide if I add it to my application. When I choose Google Maps there are margins and the map appears in the center of app’s window. I enable cache and these margins also exist in the cached tiles.


OSM and Cloud map appears as they are supposed to (without these margins, they fill the window). I want Google maps also to fill the map control. Is there a way to achieve it?
790
Also, the cached images have these margins.

Hi Mario,

I download this sample and test it also, it looks the Google map works well:

The Google map require key now, so please input your client id and private key in the sample code.

And the tile size of Google map is related with your account. Here is the document about that:
https://developers.google.com/maps/documentation/maps-static/dev-guide#Imagesizes

I hope that’s able to help you.

Regards,

Ethan

I have a key. If I didn’t have one, there would be no map to show you (with the screenshot).
I have a ‘Pay-As-You-Go’ type of API. Is there a way for the map to fill the window?

Hi Mario,

Follow Google’s request, the map is only allowed to request one tile from static library at the same time. Because that our Google layer only support single tile mode now, and if the tile size is bigger than account level allowed, the return image size will be limited. For example the tile size is limited in 640 x 640 for Pay-As-You-Go account, that’s why you can only see the 640 x 640 tile in the sample.

So there isn’t a solution to fill the window if map size is bigger than 640 x 640 and your API type is Pay-As-You-Go.

If your scenario need the filled background layer, please try the other layer for example Bing map.

Regards,

Ethan