예제 #1
0
        protected override void OnCreate(Android.OS.Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            ContentView = new OfflineRoutingView(this);
            SetContentView(ContentView);

            Initialize(ContentView.MapView);

            RoutingPackageManager = Routing.PackageManager;

            // Routing packages are as compact as possible,
            // so we create a second package manager to download region packages that contain names
            // This is only necessary for displaying them in a list. Download is by id
            MapPackageManager = new CartoPackageManager("nutiteq.osm", Routing.CreateFolder("regionpackages"));

            // Create offline routing service connected to package manager
            Routing.Service = new PackageManagerRoutingService(RoutingPackageManager);

            Alert("This sample uses an online map, but downloads routing packages");

            Alert("Click on the menu to see a list of countries that can be downloaded");
        }