예제 #1
0
        private void PopUpPressed(object sender, EventArgs e)
        {
            StopRoute();
            NCDeviceInfo  res               = navigineCore.DeviceInfo;
            NCSublocation sublocation       = navigineCore.Location.Sublocations.GetItem <NCSublocation>(currentSublocationIndex);
            CGSize        imageSizeInMeters = new CGSize(sublocation.Width, sublocation.Height);
            double        xPoint            = pressedPin.CenterX() / (mapView.Width() / scrollView.ZoomScale) * imageSizeInMeters.Width;
            double        yPoint            = (1.0f - pressedPin.CenterY() / (mapView.Height() / scrollView.ZoomScale)) * imageSizeInMeters.Height;

            NCLocationPoint point = NCLocationPoint.PointWithLocation(res.Location, res.Sublocation, xPoint, yPoint);

            navigineCore.AddTatget(point);

            pressedPin.PopUp.RemoveFromSuperview();
            pressedPin.PopUp.Hidden = true;
            isRouting = true;
            cancelRouteButton.Hidden = false;
        }
예제 #2
0
        private void MapPinPressed(object sender, EventArgs e)
        {
            VenueMapPin mapPin = (VenueMapPin)sender;

            if (pressedPin != null)
            {
                pressedPin.PopUp.RemoveFromSuperview();
                pressedPin.PopUp.Hidden = true;
            }

            pressedPin = mapPin;
            mapView.AddSubview(mapPin.PopUp);

            mapPin.PopUp.Hidden = false;
            mapPin.PopUp.SetBottom(mapPin.Top() - 9.0f);
            mapPin.PopUp.SetCenterX(mapPin.CenterX());
            mapPin.PopUp.AddTarget(PopUpPressed, UIControlEvent.TouchUpInside);
        }