blackberry maps do not show correct location on the device

Posted by SWATI on Stack Overflow See other posts from Stack Overflow or by SWATI
Published on 2010-04-30T13:50:13Z Indexed on 2010/05/01 11:07 UTC
Read the original article Hit count: 327

Filed under:
|

well frnds my code for maps works well and shows all pics and gradient paths very well on the simulator after simulating the gps ,but it does not works on the device....

The gps on device is working properly as google maps and other work related to gps are working perfectly fine

my code

         if(GPS_Location.lati!=0.0 && GPS_Location.longi!=0.0)
            {                       
                User_latitude = ((GPS_Location.lati)*100000);
                User_longitude = ((GPS_Location.longi)*100000);

                User_La = String.valueOf(User_latitude).substring(0, String.valueOf(User_latitude).lastIndexOf('.'));
                User_Lo = String.valueOf(User_longitude).substring(0, String.valueOf(User_longitude).lastIndexOf('.'));

             if(param.equals("")) //for find business near me
             {

                 document1 = "<location-document>" +
                                "<location lon='"+User_Lo+"' lat='"+User_La+"' label='User' />"+
                                "<location lon='"+User_Lo+"' lat='"+User_La+"' label='"+"User"+"' />"+
                             "</location-document>";
             }
             if(!param.equals("")) //for the directions
             {
                 Business_latitude = Double.parseDouble(param.substring(0, param.lastIndexOf(',')));
                 Business_longitude = Double.parseDouble(param.substring(param.lastIndexOf(',')+1,param.length())); 

                 Business_latitude = Business_latitude*100000;                   
                 Business_longitude = Business_longitude*100000;

                 Business_La = String.valueOf(Business_latitude).substring(0, String.valueOf(Business_latitude).lastIndexOf('.'));                  
                 Business_Lo = String.valueOf(Business_longitude).substring(0, String.valueOf(Business_longitude).lastIndexOf('.'));

                 document1 = "<location-document>" +
                                "<GetRoute>"+
                            "<location lon='"+User_Lo+"' lat='"+User_La+"' label='User' />"+
                            "<location lon='"+Business_Lo+"' lat='"+Business_La+"' label='"+"User"+"' />"+
                            "</GetRoute>"+
                        "</location-document>";
             }
              Invoke.invokeApplication(Invoke.APP_TYPE_MAPS,new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT,document1));
         }

this code works on simulator but not fine on device. just points a pin indicating user and nothing else

what to do????

© Stack Overflow or respective owner

Related posts about blackberry

Related posts about maps