Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
Posts: 90
Registered: ‎09-16-2010
My Device: Not Specified
Accepted Solution

Maps not displayed and no route shown

[ Edited ]

 

String document = "<lbs><GetRoute><location x='-8145776' y='2848395' label='5401 S Kirkman Rd,Orlando,Fl' description='FL United States' /><location x='-8056668' y='2808824' label='125 9th Ave, Indialantic, FL' description='FL,United States' /></GetRoute></lbs>";

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

 hi i'm trying to invoke a map and show routr between two locations.

Source address : 

Source address
5401 S Kirkman Rd,Orlando,Fl
Destinaltion address
125 9th Ave, Indialantic ,Fl

 

 

however i'm just not able to display the route.

I get a null pointer exception .

And the map is completely empty, with just the source address on it.

 

Please can someone try the above code. and help me out in this

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Maps not displayed and no route shown

[ Edited ]

Is this a device or simulator?

 

Which device model, which OS level?

 

Is BB Maps installed on the device? If so, can you view a map by starting the Maps program manually (clicking on the icon)?

 

 

 

 

Regular Contributor
Posts: 90
Registered: ‎09-16-2010
My Device: Not Specified

Re: Maps not displayed and no route shown

Testing app on simulator.

Model : 9550         Os 5.0

yes maps are installed on the simulator and i do get the maps once i click the  Maps application on the simulator..

 

I would be really great if you try out the document string, that i 'm using  and invoke then maps.

Please let me know if it works

Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: Maps not displayed and no route shown

i didnt find any bug in your code but i do like this and it works on simulator as well

try this:

 

 

 document1="<lbs>" +
           "<GetRoute>"+
           "<location lon='' lat='' label='User'/>"+               "<location lon='' lat='' label='"+business'/>"+
        "</GetRoute>"+ 
        "</lbs>";

 

kindly provide the lat and lon values

& invoke it the way u do to test whether this works or not

 Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT,document));
Regular Contributor
Posts: 90
Registered: ‎09-16-2010
My Device: Not Specified

Re: Maps not displayed and no route shown

Hey Thanks Swati....

  I finally got it.

It was the problem of the simulator i guess..

The same worked on 8530 simulator.

Developer
Posts: 282
Registered: ‎02-25-2010
My Device: curve,bold,storm
My Carrier: Verizon,AT&T

Re: Maps not displayed and no route shown

oh dats good

in that case u can mark the thread as solved then