示例#1
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case MENU_CAMERA_1:
                toast(item.TitleFormatted);
                mapView.MoveCamera(CameraUpdateFactory.NewMapPoint(MAP_POINT_POI1));
                return(true);

            case MENU_CAMERA_2:
                toast(item.TitleFormatted);
                mapView.MoveCamera(CameraUpdateFactory.NewMapPoint(MAP_POINT_POI2, 7f));
                return(true);

            case MENU_CAMERA_3:
                toast(item.TitleFormatted);
                mapView.MoveCamera(CameraUpdateFactory.NewMapPointAndDiameter(MAP_POINT_POI1, 500f));
                return(true);

            case MENU_CAMERA_4:
            {
                toast(item.TitleFormatted);
                var bounds = new MapPointBounds(MAP_POINT_POI1, MAP_POINT_POI2);
                mapView.MoveCamera(CameraUpdateFactory.NewMapPointBounds(bounds, 100));
                return(true);
            }

            case MENU_CAMERA_5:
            {
                toast(item.TitleFormatted);
                var bounds = new MapPointBounds(MAP_POINT_POI1, MAP_POINT_POI2);
                mapView.MoveCamera(CameraUpdateFactory.NewMapPointBounds(bounds, 100, 3, 7));
                return(true);
            }
            }

            return(base.OnOptionsItemSelected(item));
        }