0

I know that we can open the map and set the direction from source to destination by using the following URL:

http://maps.google.com/maps?saddr=23.4444,72.44445&daddr=23.55555,72.55555

But I noticed that this URL only works in iPhone and Android.

I wonder what is the syntax/codes that can be used to launch the map app in WP7 or BlackBerry with the direction shown on the map.

Cadrick Loh
  • 721
  • 1
  • 7
  • 19

2 Answers2

0

This is basically all the code you need for Windows Phone 7:

BingMapsDirectionsTask Direction = new BingMapsDirectionsTask();

LabeledMapLocation start = new LabeledMapLocation(“Hougang Ave 4 919 Singapore , Singapore”, null);
LabeledMapLocation end = new LabeledMapLocation(“Paya Lebar Air Base, Singapore”, null);

Direction.Start = start;
Direction.End = end;

Direction.Show();

Second parameter in the LabeledMapLocation constructor is a GeoCoordinate, but if you don't have an exact location you can always pass a null if you want and the app will try and find that place for you by using it's name.

More info and a demo project can be found here: Directions Task Demo

Hope this works for you. Regarding BlackBerry, sorry, no clue.

Marius Bughiu
  • 997
  • 14
  • 32
0

Blackberry devices are not support for show directions using google maps because google maps are use java script and blackberry browsers are not support fully java script.You have to use Blackberry maps to show directions using classes MapField and RichMapField

See below link for reference

J2ME/Android/BlackBerry - driving directions, route between two locations

If you need full control not maps there is an option to use third party api.Fild below link http://www.nutiteq.com/rim-blackberry-mapping-api-sdk

Community
  • 1
  • 1
koti
  • 3,681
  • 5
  • 34
  • 58