How to find the route between two places in BlackBerry?
Asked Answered
A

1

3

How do I find the route information between two places in BlackBerry?

I'm using MapField to show the map in my application.

Anarthrous answered 9/10, 2009 at 7:10 Comment(0)
S
5

As I understood, you need to get a path length between several locations.
It's not possible in MapField, you can only set that route by yourself.

Invoke BB Maps for route direction

You can always use MapField in you application for simple functionality, like present locations, and use BlackBerry Maps application for enhanced stuff like select locations and route directions presentation for user.

To invoke BB Maps for route direction use code:

Invoke.invokeApplication(Invoke.APP_TYPE_MAPS,
                        new MapsArguments(
                        MapsArguments.ARG_LOCATION_DOCUMENT,document));

With document formed like:

<location-document>
     <GetRoute>
        <location lon='-8030000' lat='4326000' label='Kitchener, ON' description='Kitchener, Ontario, Canada' />
        <location lon='-7569792' lat='4542349' label='Ottawa, ON' description='Ottawa, Ontario, Canada' />
     </GetRoute>
</location-document>

Result will be like
alt text http://www.blackberry.com/knowledgecentersupport/kmsupport/supportknowledgebase/images/DB-00599_3.jpgalt text http://www.blackberry.com/knowledgecentersupport/kmsupport/supportknowledgebase/images/DB-00599_4.jpg

Now, in BlackBerry Maps you can register your App menu item and start or update your App with selected location using MapView.
See How To - Add an ApplicationMenuItem to BlackBerry Maps

UPDATE

Use the gmap navigation service for driving directions

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

Siva answered 9/10, 2009 at 14:43 Comment(3)
Thanks Coldice,Can u pls tell me which method is good to develop Blackberry GPS application either MapField or BlackberryMap or some other map and Can u pls tell me what is the difference between MapField and Blackberry map.Anarthrous
Actually i have tried all Knowledge base documents and sample applications ya.Both map field and Blackberry map have their own merits and demerits so i don't know which is good for my application.Anyway thanks for ur help its help lot.Anarthrous
Well, I mean, you can use them both in same app. Youre welcome!Siva

© 2022 - 2024 — McMap. All rights reserved.