ThinkGeo.com    |     Documentation    |     Premium Support

KML file on Bing-Maps has an offset compared to google map and open street map

Hello ThinkGeo,
In our WPF application, I need load the kml files of pipe lines and show them on the map. I found Bingmaps always has an offset compared to google map and open street map as following screenshots:

Open street map:


Bingmaps:

I still have problem to show google map in my application as what I said in my last post, so I use Google earth to show it.

You can see the line’s location on BingMaps is slightly different to the other maps.
Even the GPS coordinates are slightly different.


Do you have any idea about this?

Thanks for your help.

Cheers
Min

Hi Min,

Please switch the zoomlevel set for different layers like this:

map.ZoomLevelSet = new BingMapsZoomLevelSet();
map.ZoomLevelSet = new GoogleMapsZoomLevelSet();

Wish that’s helpful.

Regards,

Ethan

Thanks, Ethan. Unfortunately, it doesn’t work. I still got the same result.

BingMapsTileOverlay bingMapsOverlay = new BingMapsTileOverlay();
bingMapsOverlay.MapStyle = BingMapsMapType.AerialWithLabels;
bingMapsOverlay.Name = “Bing Maps Aerial”;
bingMapsOverlay.ApplicationId = bingMapId;
bingMapsOverlay.IsVisible = true;
wpfMap.ZoomLevelSet= new ThinkGeo.MapSuite.Layers.BingMapsZoomLevelSet();
wpfMap.Overlays.Add(“bingMapsOverlay”, bingMapsOverlay);

Hi Min,

It looks my sample works well.

Attached is the sample:

9210.zip (101.5 KB)

Regards,

Ethan

Thanks for the sample, Ethan. It’s very helpful. After I changed BingMapsTileOverlay to BingMapsOverlay , it works now.

I changed my code from
BingMapsTileOverlay bingMapsOverlay = new BingMapsTileOverlay();
bingMapsOverlay.MapStyle = BingMapsMapType.AerialWithLabels;
bingMapsOverlay.ApplicationId = bingMapKey;

To:
BingMapsOverlay bingMapsOverlay = new BingMapsOverlay(bingMapKey, ThinkGeo.MapSuite.Wpf.BingMapsMapType.Aerial);

Cheers
Min

Hi Min,

I am glad to hear that’s helpful.

Regards,

Ethan