03-17-2011 08:47 AM
Hi All ,
I am developing an application for that i am showing map and writng following code
but it is not showing Pin on that map for 5.0 API O.S level.
MapView mapView = new MapView();
double lat=Double.parseDouble(ifAgentSearchInfo.getLatitu
int latInt=(int)lat;
double lot=Double.parseDouble(ifAgentSearchInfo.getLongit
int lotInt=(int)lot;
mapView.setLatitude(latInt);
mapView.setLongitude(lotInt);
mapView.setZoom(2);
MapsArguments mapsArgs = new MapsArguments(mapView);
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, mapsArgs);
Thanks to All
Solved! Go to Solution.
03-21-2011 02:27 AM
can anyone give me the answer...............
03-21-2011 06:15 AM
See the demo of Embeded map in Sample program of 5.0 API.
It will give the idea of hoe to display pin in Embeded MAp.
You can add more than pin in to it..
If not understand than reply me i will tell you..
03-24-2011 02:56 AM
HI Rajeshkparmar,
I am not getting in embeded map demo because my code is entirely defferent as following
MapView mapView = new MapView();
double lat=Double.parseDouble(ifAgentSearchInfo.getLatitu
int latInt=(int)lat;
double lot=Double.parseDouble(ifAgentSearchInfo.getLongit
int lotInt=(int)lot;
mapView.setLatitude(latInt);
mapView.setLongitude(lotInt);
mapView.setZoom(2);
MapsArguments mapsArgs = new MapsArguments(mapView);
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, mapsArgs);
above code is showing bb default map but it is not showing pin on that map
Thanks
03-24-2011 03:18 AM
hi,
It seems like you are using inbulit Map by passing argument..
String document1 = "<lbs clear='Locations'>" + "<location x='"
+ lon1 + "' y='" + lat1 />"
+ "</lbs>";
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS,
new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT,
document1));
Used lat1 lon1 as you Lat Lon..
Regards
Rajesh Parmar
03-24-2011 11:09 AM
hi Rajesh i got the solution for this but one more thinf i want to ask you,
how to display more than 2 (e.g- 10-20) pins on bb default map, whose lat , long values are coming from server
i am using GetRoute tag from XML nad passing that in mapargument
Thanks & Regards
Mansingh
03-24-2011 11:19 AM
add more location in String
like this
"<location lat='-7569792' lon='4542349' address='Ottawa, ON, CANADA'/>"
+ "<location lat='-7938675' lon='4367022' address='Toronto, ON, CANADA'/>"
05-02-2011 01:08 AM
Sorry, if i'm posting here..
But, i want to ask about invoke blackberry maps too
How to set default zoom in lbs documet..
Also, i want to set the first location to be centered in blackberry maps..
Sorry if my english language is poor...
Thanx