Beispiel #1
0
        public void dropPinAtPoint(CGPoint pointToConvert)
        {
            CLLocationCoordinate2D convertedPoint = mainMapView.ConvertPoint(pointToConvert, mainMapView);
            String pinTitle       = String.Format("Pin Number {0}", itemsArray.Count);
            String subCoordinates = String.Format("{0},{1}", convertedPoint.Latitude.ToString(), convertedPoint.Longitude.ToString());

            droppedPin = new MyAnnotation(convertedPoint, pinTitle, subCoordinates);
            mainMapView.AddAnnotation(droppedPin);
            itemsArray.Add(droppedPin);
            updatePolygon();
        }
Beispiel #2
0
        private void DropPinAtPoint(CGPoint pointToConvert)
        {
            var convertedPoint = mapView.ConvertPoint(pointToConvert, mapView);

            var pinTitle       = $"Pin Number {items.Count}";
            var subCoordinates = $"{convertedPoint.Latitude},{convertedPoint.Longitude}";
            var droppedPin     = new MyAnnotation(convertedPoint, pinTitle, subCoordinates);

            mapView.AddAnnotation(droppedPin);
            items.Add(droppedPin);
            UpdatePolygon();
        }
		public void dropPinAtPoint (PointF pointToConvert)
		{
			CLLocationCoordinate2D convertedPoint = mainMapView.ConvertPoint (pointToConvert, mainMapView);
			String pinTitle = String.Format ("Pin Number {0}", itemsArray.Count);
			String subCoordinates = String.Format ("{0},{1}", convertedPoint.Latitude.ToString (), convertedPoint.Longitude.ToString ());
			droppedPin = new MyAnnotation (convertedPoint, pinTitle, subCoordinates);
			mainMapView.AddAnnotation (droppedPin);
			itemsArray.Add (droppedPin);
			updatePolygon ();
		}