Пример #1
0
        public static UIImage HeatMapForMapView(MKMapView mapView, double boost, CLLocation[] locations, double[] weights)
        {
            if (mapView == null || locations == null)
            {
                return(null);
            }

            var points = new List <PointF>();

            for (int i = 0; i < locations.Length; i++)
            {
                CGPoint point = mapView.ConvertCoordinate(locations[i].Coordinate, mapView);
                points.Add(new PointF((float)point.X, (float)point.Y));
            }

            return(HeatMapWithRect(mapView.Frame, boost, points.ToArray(), weights));
        }
Пример #2
0
        private CGPoint GetCoordinateProjection(CLLocationCoordinate2D coordinate, MKMapView map)
        {
            CGPoint point = _map.ConvertCoordinate(coordinate, map);

            return(point);
        }