none
Bing Map 8 using webbrowser control in windows desktop application RRS feed

  • Question

  • Hi,

    Currently I am using Bing Map 7 in my windows desktop application using System.Windows.Forms.Webbrowser control. Now I want to migrate to Bing Map 8. Is it possible to use Bing Map 8 in desktop application(framework 4.5). Is there any prerequisites for the same?

    Thanks

    Friday, February 17, 2017 11:58 AM

Answers

  • Yes it is possible. The key requirements is that you have IE11 or Edge installed on your computer and that you include a meta tag to force the browser to use the latest browser available on your computer, otherwise it will use IE6 based rendering which doesn't support HTML5. There is some documentation on this here: https://msdn.microsoft.com/en-US/library/mt793328.aspx#Using%20Bing%20Maps%20V8%20in%20WinForm%20and%20WPF%20Apps

    [Blog] [twitter] [LinkedIn]

    Friday, February 17, 2017 3:44 PM
  • Do you have IE10? V8 does work on there, just not documented as a supported browser.

    It's not possible to make the built in webbrowser control in WPF/WinForm apps to use Chrome or Firefox. There is however a Chrome webbrowser control. http://stackoverflow.com/questions/790542/replacing-net-webbrowser-control-with-a-better-browser-like-chrome


    [Blog] [twitter] [LinkedIn]

    Wednesday, February 22, 2017 4:39 PM
  • If you use the Bing Maps WPF control,, then it won't matter which browser you use. Note that the Bing Maps WPF control only has a subset of the features that are in the web control. But depending on your needs, this may be fine. Yes you can use the WPF control inside of a WinForm app. Here is a blog post on how to do this: https://rbrundritt.wordpress.com/2012/01/05/using-bing-maps-in-winforms/

    [Blog] [twitter] [LinkedIn]

    Saturday, March 4, 2017 2:32 AM
  • For the WPF control:

    • EntityCollection - The WPF control has it's own MapLayer class which is similar.
    • Directions - Not out of the box. You need to tie into the Bing Maps REST services. There is a NuGet package for this. https://github.com/Microsoft/BingMapsRESTToolkit
    • Traffic - Yes
    • Reverse geocode - Have to use the REST services. Easy to do using the toolkit I pointed to earlier.
    • Custom Infoboxes - Yes, you can use an UIControl as an infobox or pushpin.

    [Blog] [twitter] [LinkedIn]

    Monday, March 6, 2017 5:00 PM

All replies

  • Yes it is possible. The key requirements is that you have IE11 or Edge installed on your computer and that you include a meta tag to force the browser to use the latest browser available on your computer, otherwise it will use IE6 based rendering which doesn't support HTML5. There is some documentation on this here: https://msdn.microsoft.com/en-US/library/mt793328.aspx#Using%20Bing%20Maps%20V8%20in%20WinForm%20and%20WPF%20Apps

    [Blog] [twitter] [LinkedIn]

    Friday, February 17, 2017 3:44 PM
  • Thanks for the help!
    Monday, February 20, 2017 11:04 AM
  • Somehow due to corporate policies the IE version is not updated to Edge or IE 11, so is there other way we can force the C# Webbrowser control to use mozilla (firefox) or chrome browser to support Bing Map 8 in desktop application?
    Wednesday, February 22, 2017 10:38 AM
  • Do you have IE10? V8 does work on there, just not documented as a supported browser.

    It's not possible to make the built in webbrowser control in WPF/WinForm apps to use Chrome or Firefox. There is however a Chrome webbrowser control. http://stackoverflow.com/questions/790542/replacing-net-webbrowser-control-with-a-better-browser-like-chrome


    [Blog] [twitter] [LinkedIn]

    Wednesday, February 22, 2017 4:39 PM
  • I don't have IE 10 and I think I can't upgrade IE to highest version due to corporate policies.

    Thank you for your valuable inputs.

    Thursday, February 23, 2017 3:32 PM
  • I also found that Bing Maps Windows Presentation Foundation (WPF) Control is similar to what I am looking for and I think I can host the WPF control in my WinForm application.

    Does this Control has dependency on IE browser? Does it support latest version of Bing Map and is there a possibility of discontinuation of this controls in future?

    Appreciate your response.

    Friday, March 3, 2017 3:27 PM
  • If you use the Bing Maps WPF control,, then it won't matter which browser you use. Note that the Bing Maps WPF control only has a subset of the features that are in the web control. But depending on your needs, this may be fine. Yes you can use the WPF control inside of a WinForm app. Here is a blog post on how to do this: https://rbrundritt.wordpress.com/2012/01/05/using-bing-maps-in-winforms/

    [Blog] [twitter] [LinkedIn]

    Saturday, March 4, 2017 2:32 AM
  • Thanks for the reply. I tried the example in the blog it works fine. As you mentioned Bing Maps WPF control has subset of the features, just wanted to know whether below functionalities are supported by Bing Maps WPF control. Also is there any SDK for the same.

    EntityCollection
    Directions
    Traffic
    Reverse geocode
    Custom Infoboxes

    Appreciate your response.

    Monday, March 6, 2017 1:50 PM
  • For the WPF control:

    • EntityCollection - The WPF control has it's own MapLayer class which is similar.
    • Directions - Not out of the box. You need to tie into the Bing Maps REST services. There is a NuGet package for this. https://github.com/Microsoft/BingMapsRESTToolkit
    • Traffic - Yes
    • Reverse geocode - Have to use the REST services. Easy to do using the toolkit I pointed to earlier.
    • Custom Infoboxes - Yes, you can use an UIControl as an infobox or pushpin.

    [Blog] [twitter] [LinkedIn]

    Monday, March 6, 2017 5:00 PM