Help Center

Local Navigation

Configure the display size of a map that displays in a UI field

A BlackBerry® device application can control the display size of a map that displays in a UI field so that you can make other UI components visible on the screen of a BlackBerry device.

If you configure the preferred size of a net.rim.device.api.lbs.MapField, you override the dimension values that are passed in layout(). The height and width values are displayed in pixels.

  1. Import the net.rim.device.api.lbs.MapField class.
  2. Invoke MapField.setPreferredSize(int preferredWidth, int preferredHeight).
    MapField myMapField = new MapField();
    myMapField.setPreferredSize(-1, -1);

Was this information helpful? Send us your comments.