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
Zenkology
Posts: 92
Registered: ‎01-31-2012
My Device: curve 8520
Accepted Solution

decimal coordinates for blackberry map view

hi guys I need to implement decimal coordinates for blackberry or what equals it in degrees um using the following code

 

		super(FullScreen.DEFAULT_CLOSE | FullScreen.DEFAULT_MENU);
		MapView mapView = new MapView();
		String document = "<lbs><location lon='-7938675'' lat='7938675'' label='Toronto, ON' description='Toronto' zoom='10'/></lbs>";
		
		Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(
				MapsArguments.ARG_LOCATION_DOCUMENT, document));

 

 when I change the values of lat,and lo in decimal or degrees it shows the default place ,any help please

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: decimal coordinates for blackberry map view

what do mean with decimal?
the numbers are multiplied with 100.000 according to the API, are you aware of that?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Regular Contributor
Zenkology
Posts: 92
Registered: ‎01-31-2012
My Device: curve 8520

Re: decimal coordinates for blackberry map view

I want to add
Latitude:30.0503199°
Longitude:31.2439383°

how can I add it ?
Developer
rabiray
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold

Re: decimal coordinates for blackberry map view

What i have done...

 

MapView mapView = new MapView();
mapView.setLatitude((int) (YOUR VALUE * 100000));
mapView.setLongitude((int) (YOURVALUE * 100000));
mapView.setZoom(3);

Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(mapView));

Regular Contributor
Zenkology
Posts: 92
Registered: ‎01-31-2012
My Device: curve 8520

Re: decimal coordinates for blackberry map view

great thnx :smileyhappy: