Bing Statellite

Hi

Can anyone provide an example of how to get the Bing Satellite map to load at the correct x/y coords and be able to zoom in and out like I can do with OpenStreetMaps eg
If providers.Add(providerID, “Custom TMS provider”, “https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png”, tkTileProjection.SphericalMercator, 0, 18) = False Then

I have a Bing Licence key for Windows App as I am using MS Access

Thanks

Colleen

Hi Colleen,

This is what I used in VB.net:

        Map1.TileProvider = MapWinGIS.tkTileProvider.BingSatellite
        gs.BingApiKey = "Ah...    ....4EKu"
        Map1.KnownExtents = MapWinGIS.tkKnownExtents.keUSA
        Map1.Tiles.DoCaching(MapWinGIS.tkCacheType.Disk) = True
        Map1.Tiles.UseCache(MapWinGIS.tkCacheType.Disk) = True
        Map1.Tiles.Visible = True

Does that help?
David

Hi

Thanks so much for your help, I had something similar but kept giving me an error message. Still not quite sure what is wrong, however I have combined it with what you have and it now works

Previous

Dim gs As GlobalSettings
Set gs = New GlobalSettings
With gs
.BingApiKey = "wJs.....HyplXk"
.AllowProjectionMismatch = False
.ReprojectLayersOnAdding = True
.AllowLayersWithIncompleteReprojection = True
End With
Map1.Tiles.providerID = tkTileProvider.BingSatellite
Map1.Tiles.providers.Add tkTileProvider.BingSatellite

Working

Map1.TileProvider = MapWinGIS.tkTileProvider.BingSatellite
Dim gs As GlobalSettings
Set gs = New GlobalSettings
With gs
.BingApiKey = "wJsSkn-..kOiH3RMOJRqkl-yF_ugm6n4-ujMsWTBHyplXk"
.AllowProjectionMismatch = False
.ReprojectLayersOnAdding = True
.AllowLayersWithIncompleteReprojection = True
End With
Map1.Tiles.DoCaching(MapWinGIS.tkCacheType.Disk) = True
Map1.Tiles.UseCache(MapWinGIS.tkCacheType.Disk) = True
Map1.Tiles.Visible = True

Regards

Colleen

The difference is that in the working part you select the existing BingSatellite provider and in your init version you were adding a new provider with the same providerId.

Obviously the working example is how you should do it.