• Question

  • Will there be a map control for the winRT framework on windows 8? I assume the silverlight control won't work in a windows 8 metro app. I'm really hoping were not stuck with the AJAX version.


    • Moved by Ricky_Brundritt Friday, March 16, 2012 6:58 PM (From:Bing Maps: Map Control and Web services Development)
    Wednesday, September 21, 2011 2:25 PM


All replies

  • What's wrong with the AJAX version?
    Wednesday, September 21, 2011 3:29 PM
  • Try Ajax V7 control, it is tailored for win8 Metro style apps. You might see some map apps based on v7 mapcontrol coming soon in win8 app gallery.
    Hemant Goyal
    Wednesday, September 21, 2011 8:58 PM
  • In what way has the AJAX control been "tailored" for Metro, I wonder?

    As far as I understand it, security constraints prevent you loading the Bing Maps AJAX control (or, for that matter, any external script libraries) within the local ms-wwa context of a Metro app. The only way I've been able to circumnavigate this is to place the Bing Map in an embedded iFrame loaded from the web context, then communicate beween the host application and the embedded iframe map using cross-document messaging (i.e. postMessage calls).

    This works, but it's hardly elegant, and introduces an unnecessary abstraction layer with no benefits that I can think of. A native WinRT control that could be called directly from within the local context would be far, far better.

    If there's a better way to use the AJAX control in a Metro app that is demonstrated in source code for upcoming examples in the win8 app gallery then I'll look forward to seeing them.

    (disclaimer - I haven't looked at windows 8 much yet, and I wasn't at BUILD, so there's possibly is a better solution that I'm unaware of. If so, please enlighten me!)

    twitter: @alastaira blog:
    Wednesday, September 21, 2011 10:14 PM
  • I too need to take deeper drive in Win 8 apps but you can get sample apps, there should be certain apps which uses V7 such as The Ajax control can recognize the touch events from win8 devices.



    Hemant Goyal
    Thursday, September 22, 2011 5:29 AM
  • Well, the good news is that, assuming that those samples are meant to demonstrate best practice, I'm doing it exactly right ;) The Mashup Sample you linked to uses exactly the same pattern as me - embedding the v7 control in an iframe that uses the web context.

    Unfortunately, the sample itself is too primitive to really demonstrate the pitfalls of this approach - all it does is to embed an inline map that runs completely independently of the container app. If you try to add two-way interaction between the parent application container and the map iframe you'll quickly end up with spaghetti code as you try to marshall all the postMessage calls between them.

    Even if you successfully expose the map control to the parent container (and vice-versa), you're still not able to take advantage of many of the new WinRT features available to the native app - sensor support, multimedia support etc. - because, in order to be displayed on the map, these would have to be converted back to postMessage calls again.

    @Hemant - can I suggest you try rebuilding some of the Bing Maps v7 iSDK examples in a Metro app, and then you might see why a native WinRT control would be beneficial...

    twitter: @alastaira blog:
    Thursday, September 22, 2011 6:26 AM
  • I second the motion.
    Thursday, September 22, 2011 4:49 PM
  • Sure tanoshimi - I will definately give a shot.
    Hemant Goyal
    Friday, September 23, 2011 5:01 AM
  • Some what related. It was just announced that the v7 AJAX control has recieved someupgrades so that touch is supported for IE10 in Windows 8. More information here:
    Friday, September 23, 2011 9:16 AM
  • Can you host it in a Metro XAML application?


    Monday, September 26, 2011 8:03 PM
  • AFAIK, if you want to use Bing Maps in a Metro App you've got to use the HTML/Javascript option combined with the AJAX v7 control (and, even then, you've got to jump through a few hoops to get it to work).

    For what it's worth, I wrote up a blog article about my initial experiences of creating a slippy map interface in a Metro App, here:
    twitter: @alastaira blog:
    Monday, September 26, 2011 8:24 PM
  • I just came off a windows phone project where we used the Silverlight bing map control. Now I'm wrting a desktop app using the AJAX version (since the WPF control is in beta) and the differences are tremendous!!! Using the Ajax version in a webbrowser control is a terible experience. Having to deal with javascript and interOp between the app and the ajax map is not ideal at all.

    The ajax map doesnt compare to a native control in performance, xaml controls in the map, code maintainability, and overall sanity of I surely am hoping the Bing team will create a native map control for winRT.

    If you really want to see some very creative nice map applications in windows 8... please create a native winRT control...!

    Wednesday, September 28, 2011 7:20 PM
  • I have to chime in here and second that, a native WinRT Bing Maps control is probably going to have to be essential (I'm sure you guys know that already :)
    Sunday, October 9, 2011 12:15 AM
  • Yes, a "native" Bing Maps control for WinRT will be a necessity for us to build really nice mapping applications on the platform. Requiring us to frame in the v7 Ajax control is absolutely terrible! You can't even use it with XAML based Metro apps, and are required to use HTML/JS if you want to have just 1 map displayed in your app.
    Microsoft MVP - Bing Maps
    Blog: | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control
    Saturday, November 12, 2011 6:33 PM
  • I realise Microsoft are currently infatuated with JavaScript, but unless they are quite happy to alienate their existing developer base while vainly chasing after the cool kids, they must provide basic features like this for all supported languages if they want the platform to be a success.

    Friday, February 3, 2012 1:33 AM
  • There will be a native Bing Maps control for WinRT.
    Thursday, February 23, 2012 10:27 PM
  • Kristoffer - your profile is not shown as Microsoft-affiliated but I'm assuming you're making that statement in some official capacity on behalf of the Bing Maps team, in which case thankyou for the confirmation.

    It's nice to know that opinions on this forum have been listened to, and MS have rethought their view that the AJAX v7 control is ideally suited to Metro... :)

    (Richard, Hemant - have you had chance to try creating a Metro app yet using the AJAX v7 control? Please let us know if you have a better method than that which I described above)

    twitter: @alastaira blog:

    Thursday, February 23, 2012 11:10 PM
  • Add me to the list of Maps for WinRT support.

    As an aside, tanoshimi, thanks for your blog posts wrt to maps and Win8 :)

    Friday, February 24, 2012 12:24 AM
  • Stay tuned for some more public information on this topic shortly.

    Microsoft has always recognized the need to provide solutions for both categories of developers (web app and WinRT) on Win8. The HTML control was just announced first since it was closer to being ready (although it still needed some adjustments to make it more developer friendly as noted above). A lot of PR has focused around the HTML development story since this is new to Windows 8, but should not give the impression that this is the only option for Win8.

    Monday, February 27, 2012 8:49 PM
  • There is now a Beta control for using Bing Maps in WinRT apps.

    Microsoft MVP - Bing Maps
    Blog: | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control

    Friday, March 2, 2012 2:30 PM
  • Friday, March 2, 2012 6:22 PM
  • Hey Chris;  I noticed in this WinRT control, when referencing an external tile source, the tiles are now required to be based on a quadkey rather than the x/y/z specifications that are used in all of the other Bing maps platforms.  Do you know why they chose to go this route, and if they plan on supporting the aforementioned x/y/z format in the final version?
    Wednesday, March 14, 2012 4:52 PM
  • All of the other Bing Maps controls use Quadkeys. You can also use XYZ. Take a look at this blog post:

    Wednesday, March 14, 2012 6:56 PM
  • You can use XYZ if you use HTML/Javascript but not if you're writing a XAML app. The XAML control unfortunately does not have a callback to specify the url so for now it is quad key only. I can't make any promises about whether we'll support them for the final release.
    Friday, March 16, 2012 11:22 PM
  • You can use XYZ if you use HTML/Javascript but not if you're writing a XAML app. The XAML control unfortunately does not have a callback to specify the url so for now it is quad key only. I can't make any promises about whether we'll support them for the final release.
    Ok - if I could put in my official request for this feature, it would be a huge plus.  Currently we have a ridiculously popular weather app for WP7, iOS, and Android.  The WP7 app was very easy to write because the handling of the tiles is all done with a URL tile referencing class.  It works the same for the latest WPF bing maps control as well... but the current incarnation of the WinRT control doesn't support this class, so without it, we'd have to write our own mapping engine for the app.  We wanted to release this app for Windows 8 in the store, but it'll unfortunately have to get shoved way down the totem poll if the final version of the WinRT map control doesn't support the TileSource class like the other two controls do.

    Thanks for the information, regardless!
    Wednesday, March 28, 2012 10:19 PM