views:

99

answers:

3

The built-in emulator from the WP7 Tools doesn't have the Bing App installed, and I don't have any phone hardware to test with. So I'm simply wondering, how can I open the Bing Maps Application to a specific Lat/Long?

Related Questions:

iPhone -- http://stackoverflow.com/questions/30058/how-can-i-launch-the-google-maps-iphone-application-from-within-my-own-native-app

Android -- http://developer.android.com/intl/fr/guide/appendix/g-app-intents.html

+1  A: 

Unfortunately there is no way to launch the Bing Maps App from within your own application.
In an early CTP there was a way but this has been removed. Hopefully it will return in the future but it is not on any current, public, roadmaps.

This leaves two alternatives.

Option 1
You could perform a search for the lat/long you want to show. The search app does directly integrate with the bing maps app so, assuming that bing can take the lat/long you provide and return something useful, the user would still be able to do whatever they wished within the bing maps app.

This has 2 downsides though. Firstly, you have no control over the search results. And, secondly, you cannot test this on the emulator.

Option 2
You could use the BingMaps control within your own silverlight application.
(Prior to the RTM, it was posible to use the full Silverlight version of the control within your app. But, this had a few quirks and was only ever intended as a stop gap solution.)
While not as fully featured as the app, the control does offer a lot of functionality.

Without a real device, but you could simulate location data, for testing, with the Reactive Extensions.
Even with a real device you will probably want to look at doing this as it's a lot easier than trying to debug while walking or driving around.

Matt Lacey
Thats good, but I'd like to open the Bing App to a specific lat/long so the user can use all of the rest of the Bing app features (map, route, traffic, etc) I don't want to write all of that code into my app. I'd rather send them to the Bing App. The link I posted for Android does what I want, I'm just looking for the WP7 specific version of it.
Nate Bross
A: 

Yes you can do this. I've got it running in the emulator (however, as many people have said there's no guarantee the Bing Maps for Silverlight control will run on the actual device)

Here is the xaml:

<m:Map Grid.Row="0" x:Name="mapMain" ZoomLevel="5"  Mode="AerialWithLabels" CredentialsProvider="YOURBINGMAPSLICENSE" />

and here's some code to set the location in the .cs class

var ppLoc = new Location(-37.821285, 144.97785);
mapMain.SetView(ppLoc, 17);
Mac
I'm not looking to add a map view, I'm looking to start the actual bing app.
Nate Bross
Oh I see. Sorry about the misunderstanding.
Mac
A: 

Bing maps silverlight control is now supported out of the box and is part of the tools... learn more about it here: http://channel9.msdn.com/Learn/Courses/WP7TrainingKit/WP7Silverlight/UsingBingMapsLab/Exercise-1-Introduction-to-the-Bing-Map-Control

rudigrobler
I'm not looking to add a map view, I'm looking to start the actual bing app.
Nate Bross