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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 104
Registered: ‎08-03-2010
My Device: Blackberry Z10
My Carrier: Idea
Accepted Solution

Need Box Lat Long in MapField OS6.0

Hi Everyone,

 

I want to find the left,right,top, bottom latitude longitude from Map,

I have used the 6.0 API MapDimentions and MapField.

By using ,

  mapDimentions.getbottom(); //it will give me the bottom coordinate. or like getleft,gettop....

 

but it would not change when i moved the map.

 

i need a box coordinate or lat lon(all four) and also it will change when map moved..

 

Thanks,

 


Please mark posts as solved if you found a solution.
Feel free to press the kudos button to thank the user that helped you
Developer
Posts: 604
Registered: ‎12-27-2010
My Device: Not Specified

Re: Need Box Lat Long in MapField OS6.0

You use convertFieldToWorld and use the 4 corners of the screen (in pixels) to get the appropriate map lat/lon coordinates.

Developer
Posts: 104
Registered: ‎08-03-2010
My Device: Blackberry Z10
My Carrier: Idea

Re: Need Box Lat Long in MapField OS6.0

Hi,

No.i am not using that but i can try for that,

thanks

 

any other comments.

 

Actually i am just test the OS 6.0 MapDimention class and its getboundry Method..

 

 

 


Please mark posts as solved if you found a solution.
Feel free to press the kudos button to thank the user that helped you
Developer
Posts: 104
Registered: ‎08-03-2010
My Device: Blackberry Z10
My Carrier: Idea

Re: Need Box Lat Long in MapField OS6.0

Hi ,

 

getboundry return the

left

right

below

and

top

cordiantes but it was static..

 

i want to get the four corner or four side data in dynamic manner like if i am scrolling the map than that data will be change by approciate  mapfield data..

 


Please mark posts as solved if you found a solution.
Feel free to press the kudos button to thank the user that helped you
Highlighted
Developer
Posts: 104
Registered: ‎08-03-2010
My Device: Blackberry Z10
My Carrier: Idea

Re: Need Box Lat Long in MapField OS6.0

Hi

 


How should i get the 4 corners lat lon using convertFieldToWorld?

can you give me some hint or comments?

 

Thanks..


Please mark posts as solved if you found a solution.
Feel free to press the kudos button to thank the user that helped you
Developer
Posts: 604
Registered: ‎12-27-2010
My Device: Not Specified

Re: Need Box Lat Long in MapField OS6.0

Here's the first corner:

 

 

//Just creating a new Coordinates object, the values don't matter
Coordinates topLeft = new Coordinates(0,0,Float.NaN);
//The field point in pixels that you want to convert, this is where you put your four corners
XYPoint coords = new XYPoint(0, 0);
convertFieldToWorld(coords, topLeft);

 

 

After this topLeft will have your latitude and longitude of the top left corner of your map. Hope this helps!

Developer
Posts: 104
Registered: ‎08-03-2010
My Device: Blackberry Z10
My Carrier: Idea

Re: Need Box Lat Long in MapField OS6.0

hi jprofitt

Thanks for the Help..

 

Can you know about the MapDimention and getboundrybox() in 6.0 ?

 it will also give me a 4 side cordiante..

it will display just +- boundry of latititude..

eg. like -76.1234 to 76 1234

 

it will not change when i m move the map..

 

Thanks...


Please mark posts as solved if you found a solution.
Feel free to press the kudos button to thank the user that helped you
Developer
Posts: 604
Registered: ‎12-27-2010
My Device: Not Specified

Re: Need Box Lat Long in MapField OS6.0

I've only used the MapField in 5.0 so unfortunately I'm not experienced with that object/method.

Developer
Posts: 201
Registered: ‎12-17-2010
My Device: Not Specified

Re: Need Box Lat Long in MapField OS6.0

hi, can you send your map field demo please ? so that i can get more idea about map. please send just demo code of it so that i can get the actual idea about map. Thanks & Regards