06-27-2012 09:25 PM
Did RIM remove this feature? I use the following code to display route:
String document = "<lbs><getRoute>" + "<location x='" + (currentPosLong * 100000) + "' y='" + (currentPosLat * 100000) + "' label='You' description='Your location' />" + "<location x='"+ (longitude * 100000) + "' y='"+ (latitude * 100000) + "' label='Destination' description='Destination address' />" + "</getRoute></lbs>"; Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT, document));
and the route does not show up on the maps app! I tried changing the "getRoute" to "GetRoute" because two different official documentations had different ways in caps.
Also, when map app is invoked, it immediately centeres + zooms to gps location. Is there any way to block this?
07-02-2012 11:39 AM
This should still work. You can find documentation on it here and here. Which BlackBerry Smartphone model and BlackBerry handheld software version are you testing on? You can find this under Options, About on the BlackBerry Smartphone.
Have you tried multiple locations? It could be that address you are testing with is unknown.
07-03-2012 03:24 PM
We're testing it on OS 6 Torch, OS 7.0 Bold 9900, and OS 7.1 Bold 9900
They all show the same behavior: route is not shown + GPS takes affect right away and moves the center of the map to current location.
It is either I am using wrong code, there's serious bug in the map app, or there's a setting in map app that I have switched on that is producing such behavior. I think the problem is the second one considering I've eventually got rid of all my code and boiled it down to the code from the documentation and I still observe the same behavior.
Can anyone else try the code and see if route actually show up on the map app?
08-01-2012 01:56 PM - edited 08-01-2012 02:01 PM
I used the following code (taken from the docs) and it did work correctly in 7.1. Can you try this out?
String document = "<lbs id='WatRoute'><getRoute>" + "<location x='-8052237' y='4346518' " + "label='Waterloo, ON' description='Waterloo, Ontario, Canada' />" + "<location x='-7569792' y='4542349' " + "label='Ottawa, ON' description='Ottawa, Ontario, Canada' />" + "</getRoute></lbs>"; Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments (MapsArguments.ARG_LOCATION_DOCUMENT, document));