2

In Class net.rim.device.api.lbs.MapField There's a method convertWorldToField, which is quite useful.

After API upgrading new Map Class has been moved to:

net.rim.device.api.lbs.maps.ui.MapField

But method convertWorldToField disappeared, where is the method in new API ???

Nate
  • 31,017
  • 13
  • 83
  • 207
Lewis Z
  • 498
  • 7
  • 16

1 Answers1

0

In the new set of classes, you don't need to convert from world to field to add something to the map. Instead, each item you add (extending Mappable) knows where to draw itself. This is how you create a location:

    MapLocation ml = new MapLocation( 43.47751, -80.54817, "label", null );
    MapDataModel model = map.getModel();
    model.add(ml, "tag");

To check if something is or not visible you can use the methods in MapDataModel class.

Mister Smith
  • 27,417
  • 21
  • 110
  • 193
  • 1
    Cool, but I would like to show an image on that point.... A green dot that represents where I am (the GPS dot). The MapImage does not work well. I think the best way is to implement the paint method of MapField by myself, where I can draw the image and I have to use `convertWorldToField ` – Lewis Z Nov 12 '12 at 14:56