ThinkGeo.com    |     Documentation    |     Premium Support

V12.3.0 How to turn off the wrapping of GoogleMapsOverlay

Hi ThinkGeo

I’m using the new v12.3.0 ThinkGeo.Core and ThinkGeo.UI.Wpf, and my GoogleMapsOverlay seems to be wrapping around the dateline as in I can keep panning right and left and see the world duplicated. When I use the BingMapsOverlay this does not happen.

I do not know if I am doing it correctly but I’ve tried to use the option this.WrappingMode = WrappingMode.None;

Please advise on how to stop the wrapping

Thanks
Jesper

Thanks Jesper,
Google map is a little different. Because the google map term of use. We have to use the google map static api. And we should not modify the image. That is why you can tell the google map overlay using the single tile mode. We display what we get from google. We don’t cut or join them. I recommend using

mapView.RestrictExtent = MaxExtents.GoogleMaps;

to limit the extent to the world extent range.

Thanks

Frank

Hi Frank

I have tried the RestrictExtent and it does not fully work as expected. Because if I’m using the small Google maps plan with a max tile size of 640x640 and I’m zoomed all the way out I can not see the entire world and I’m not able to pan left and right to do so.

Thanks
Jesper

Jesper,
I did some test with our how do I sample. We should able to get something like this.

  GoogleMapsOverlay googleMapsOverlay = new GoogleMapsOverlay(googleApiKey.Text, googleSigningSecret.Text);
            mapView.RestrictExtent = MaxExtents.GoogleMaps;
            mapView.Overlays.Add(googleMapsOverlay);
            mapView.Refresh();

Thanks

Frank