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
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100
Accepted Solution

MapField

Can I show several location points in one MapField??
Please use plain text.
Developer
hagen
Posts: 100
Registered: ‎04-07-2009
My Device: Not Specified

Re: MapField

Can you show one location point in one MapField?

 

Do you like to overload the screens paint(Graphics) method?

Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: MapField

Yes, I did show one... but just using....     mymap.moveTo(coordinates);

 

I have no ideao of how to do it overloading pain(Graphics).

Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: MapField

Actually, i was wrong... what i did it's just center the field with that position... i don't know how to draw a location... any help?
Please use plain text.
Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: MapField

You can draw multiple locations POI's on mapfield. Use this piece of code for the same

protected void paint(Graphics graphics) { super.paint(graphics); for(int i = 0;i< HttpCommunication.poiArr.size();i++) { graphics.drawBitmap(newX, newY, bitmap.getWidth(), bitmap.getHeight(), bitmap, 0, 0); } }

 

 


Press the kudos button to thank the user who helped you.

If your problem was get solved then please mark the thread as "Accepted solution".

 

Deepesh Gupta
Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: MapField

Thanks. And i guess to draw a route would be a little complicated no?
Please use plain text.
Developer
Posts: 432
Registered: ‎02-23-2009
My Device: Not Specified

Re: MapField

you can use graphics.drawline() instead of drawbitmap

 

 


Press the kudos button to thank the user who helped you.

If your problem was get solved then please mark the thread as "Accepted solution".

 

 

 

Deepesh Gupta
Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: MapField

Thanks. But with that i guess i just draw a straight line, any idea if i have to draw the right route, i mean, everypoint in the route?
Please use plain text.
Developer
pwerry
Posts: 177
Registered: ‎01-21-2009
My Device: 9900

Re: MapField

You can draw more than one line...
Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: MapField

I know it, but what i was thinking is it's complicated to know exactly everypoint of the route and draw them.
Please use plain text.