ThinkGeo.com    |     Documentation    |     Premium Support

GoogleMapsOverlay - disable tiles?

We use the GoogleMapsOverlay and have the problem that ThinkGeo makes a lot of small requests to the Google Static Maps API retrieving a lot of tiles. Every single tile gets a big copyright notice from Google - even for Premier API users. The map looks really ugly this way. Users would complain.

Is there any setting to retrieve larger tiles from Google?

I have tried setting:

TileHeight = 2048, 
TileWidth =  2048,
TileType = TileType.SingleTile,

on GoogleMapsOverlay

But it didn’t help.

Another thing:
As I understand Google’s documentation, the Google Static Maps API is not designed to be used with tiles - why is ThinkGeo using this API anyway? There would be alternatives such as the JavaScript-API - sure a browser control wouldn’t allow transparency with other layers. But I guess the Google Maps layer would always be the base layer with others on top of it.

Hi Andreas,

Only our Web and MVC edition can support GoogleMaps JavaScript API, for other desktop edition it require static API.

The GoogleOverlay can only support 256x256 with multiply mode, the TileHeight TileWidth and TileType is from it’s base class and won’t works here.

If you want to set the tile size and mode, please directly use our GoogleMapsLayer, as below is a test sample:

private void WpfMap_Loaded(object sender, RoutedEventArgs e)
    {
        Map1.MapUnit = GeographyUnit.Meter;

        LayerOverlay overlay = new LayerOverlay();
        GoogleMapsLayer googleMapsLayer = new GoogleMapsLayer();
        overlay.Layers.Add(googleMapsLayer);
        
        googleMapsLayer.TileWidth = 512;
        googleMapsLayer.TileHeight = 512;
        googleMapsLayer.TileMode = GoogleMapsTileMode.MultiTile;

        googleMapsLayer.SendingWebRequest += Gm_SendingWebRequest;

        Map1.Overlays.Add(overlay);

        Map1.CurrentExtent = new RectangleShape(-12709587.0184768, 5229587.90773336, -12247908.5223526, 4862691.08962139);

        Map1.Refresh();
    }

    private void Gm_SendingWebRequest(object sender, SendingWebRequestEventArgs e)
    {
        Debug.WriteLine(e.WebRequest.RequestUri);
    }

Because Google’s limitation, without key we cannot require much bigger size tile, so if you want to make size bigger, please use Google’s id and key.

Wish that’s helpful.

Regards,

Don

A tile size of 1024x1024 looks like an acceptable trade-off between performance and amount of Google logos.

Nonetheless having a Google logo in the middle of the map is far from ideal.

Hi Andreas,

Google’s logo always need to be keep because license, if you are using GoogleMapsLayer and their key, I think you can choose bigger tile, but just like you mentioned, the performance will met problem if we always require big tile.

Regards,

Don