# Open Bing map layer using vb.net

**URL:** <https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096>\
**Category:** MapWinGIS\
**Created:** [September 11, 2021, 12:13am UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096 "2021-09-11T00:13:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yasser](https://avatars.discourse-cdn.com/v4/letter/y/5f9b8f/32.png) [@yasser](https://mapwindow.discourse.group/u/yasser)\
**Post date:** [September 11, 2021, 12:13am UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/1 "2021-09-11T00:13:22Z")

</div>

i try to open bing map from [vb.net](http://vb.net) but i could not  
i try the url link in bing it works good but when i put the code in the [vb.net](http://vb.net)  
it did not work in mapwingis  
i search everywhere but i found no answer or example of solve of this problem  
please if anyone know how to solve this problem

```
    Dim BingMapsKey As String = "j9zDXCzbxVa..........."

    Dim url As String = "http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/30.251085,31.481398/14?mapSize=1000,1000&key=" & BingMapsKey
    mainmap.AddLayer(url, True)
```

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 31, 2022, 3:25pm UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/2 "2022-01-31T15:25:42Z")

</div>

Sorry for the late reply.  
The Bing provider is already in the Tiles class: [axMap1.Tiles.Provider = tkTileProvider.Bing](https://mapwindow.org/documentation/mapwingis4.9/class_tiles.html#details)

Just set your API key in [GlobalSettings.BingApiKey](https://mapwindow.org/documentation/mapwingis4.9/class_global_settings.html#a44d880d642bcb49e7358763838dbe58d)

---

<div class="post-metadata">

**Author:** ![yixing](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yixing](https://mapwindow.discourse.group/u/yixing)\
**Post date:** [March 3, 2022, 1:18am UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/3 "2022-03-03T01:18:24Z")

</div>

why my C# code does not work

```
  axMap1.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR;
        new GlobalSettings() { BingApiKey = "my bing key" };
        axMap1.Tiles.Provider = tkTileProvider.BingMaps;

```

when I run the code, the application exits.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [March 3, 2022, 11:09am UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/4 "2022-03-03T11:09:26Z")

</div>

I’m not sure.  
Do you have the crash when using OSM as well?

---

<div class="post-metadata">

**Author:** ![yixing](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yixing](https://mapwindow.discourse.group/u/yixing)\
**Post date:** [March 3, 2022, 11:12am UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/5 "2022-03-03T11:12:08Z")

</div>

> [@pmeems](#):
>
> Do you have the crash when using OSM as well?

No. It works well when I used OSM. And the website [https://mapwindow.org/](https://mapwindow.org/) is not in the service.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [March 3, 2022, 11:18am UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/6 "2022-03-03T11:18:00Z")

</div>

We know [mapwindow.org](http://mapwindow.org) is offline. We’re working on it.  
You can use [MapWinGIS: Tiles Class Reference](https://mapwindow.github.io/MapWindow-Documentation/mapwingis/class_tiles.html) for the documentation.  
You could enable the tile logging and see what errors are logged.  
Perhaps the URL for Bing is changed or something else has changed.

---

<div class="post-metadata">

**Author:** ![yixing](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yixing](https://mapwindow.discourse.group/u/yixing)\
**Post date:** [March 3, 2022, 12:09pm UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/7 "2022-03-03T12:09:26Z")

</div>

Could you tell me how to enable the tile logging?

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [March 9, 2022, 8:12am UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/8 "2022-03-09T08:12:11Z")

</div>

Look at [GlobalSettings.StartLogTileRequests()](https://mapwindow.github.io/MapWindow-Documentation/mapwingis/class_global_settings.html#a8f170d3e7620dd6836d6ebc6d3afb925)

I updated the documentation and added a link to GlobalSettings.StartLogTileRequests() in [Tiles.LogFilename](https://mapwindow.github.io/MapWindow-Documentation/mapwingis/class_tiles.html#a1ae5ca765b1ef0e97092ea41df6a0a01)

---

<div class="post-metadata">

**Author:** ![yixing](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yixing](https://mapwindow.discourse.group/u/yixing)\
**Post date:** [March 10, 2022, 7:30am UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/9 "2022-03-10T07:30:24Z")

</div>

thank you 😁 I will learn more about the Tiles class.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [April 1, 2022, 2:05pm UTC](https://mapwindow.discourse.group/t/open-bing-map-layer-using-vb-net/1096/10 "2022-04-01T14:05:50Z")

</div>

Closed on April 1, 2022, 2:05pm UTC


