코드 샘플: 프로그램에 지도 추가

import net.rim.device.api.lbs.maps.*;
import net.rim.device.api.lbs.maps.model.*;
import net.rim.device.api.lbs.maps.ui.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.container.*;
public class RichMapFieldDemo extends UiApplication
{
    public static void main(String[] args)
    {
        RichMapFieldDemo theApp = new RichMapFieldDemo();
        theApp.enterEventDispatcher();
    }
    public RichMapFieldDemo()
    {
        pushScreen(new MapScreen());
    }
}
class MapScreen extends FullScreen
{
    public MapScreen() 
    {
        super( FullScreen.DEFAULT_CLOSE | FullScreen.DEFAULT_MENU );
        RichMapField map = MapFactory.getInstance().generateRichMapField();
        MapAction action = map.getAction();
        action.setCentreAndZoom(new MapPoint(43.47462, -80.53820), 2);   
        add(map);
    }
}

이 정보가 도움이 되었습니까? 의견을 보내 주십시오.