Exemple #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.
            // Perform any additional setup after loading the view, typically from a nib.
            mapView = new NMapView(View.Frame);
            NavigationController.NavigationBar.Translucent = false;
            // set the delegate for map view
            mapView.WeakDelegate = this;

            // set the application api key for Open MapViewer Library
            //[self.mapView setClientId:@"YOUR CLIENT ID"];
            mapView.SetClientId(AppSetting.CLIENT_ID);
            mapView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;

            // set delegate to use reverse geocoder API
            //WeakReverseGeocoderDelegate 를 직접 구현하는 방식과
            //Event를 구현하는 방식 모두 가능
            //https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/binding/objective-c-libraries?tabs=vsmac#event-handlers-and-callbacks
            //mapView.WeakReverseGeocoderDelegate = this;
            mapView.DidFindPlacemark += OnDidFindPlacemark;
            mapView.DidFailWithError += OnDidFalWithError;

            View.AddSubview(mapView);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.
            mapView = new NMapView(View.Frame);
            NavigationController.NavigationBar.Translucent = false;
            // set the delegate for map view
            mapView.WeakDelegate = this;

            // set the application api key for Open MapViewer Library
            //[self.mapView setClientId:@"YOUR CLIENT ID"];
            mapView.SetClientId(AppSetting.CLIENT_ID);
            mapView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;

            View.AddSubview(mapView);
            currentState = State.Disabled;

            UIButton button = new UIButton(new CGRect(15, 30, 36, 36));
            var      image  = UIImage.FromBundle("v4_btn_navi_location_normal");

            button.SetImage(image, UIControlState.Normal);
            button.AddTarget(buttonClicked, UIControlEvent.TouchUpInside);
            changeStateButton = button;
            View.AddSubview(button);
        }
Exemple #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.
            mapView = new NMapView()
            {
                Frame = View.Frame,
            };

            //// set the delegate for map view
            mapView.WeakDelegate = this;//new NMapViewNPOIdataOverlayDelegate();

            mapView.SetClientId(AppSetting.CLIENT_ID);
            View.AddSubview(mapView);
        }
        private NMapView mMapView;           // 지도 화면 View

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            mMapView = new NMapView(this);
            SetContentView(mMapView);
            mMapView.SetClientId(AppSetting.CLIENT_ID); // 클라이언트 아이디 값 설정
            mMapView.Clickable            = true;
            mMapView.Enabled              = true;
            mMapView.Focusable            = true;
            mMapView.FocusableInTouchMode = true;
            mMapView.RequestFocus();
            //var controller = mMapView.MapController;
            //controller.SetZoomLevel(13);
        }
Exemple #5
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.
            mapView = new NMapView(View.Frame);
            NavigationController.NavigationBar.Translucent = false;
            // set the delegate for map view
            mapView.WeakDelegate = this;

            // set the application api key for Open MapViewer Library
            //[self.mapView setClientId:@"YOUR CLIENT ID"];
            mapView.SetClientId(AppSetting.CLIENT_ID);
            mapView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;

            View.AddSubview(mapView);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            mapView = new NMapView(View.Frame)
            {
                //set the delegate for map view
                WeakDelegate = this
            };
            // set the application api key for Open MapViewer Library
            mapView.SetClientId(AppSetting.CLIENT_ID);
            mapView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            View.InsertSubview(mapView, 0);

            // set min and max level for range in the UIStepper
            InitStepper(mapView.MaxZoomLevel(), mapView.MinZoomLevel(), 11);
            View.BringSubviewToFront(levelSetpper);

            mapView.SetBuiltInAppControl(true);
            mapView.Layer.AddAnimation(new Animation(this), "mapViewAnimation");
        }