コード例 #1
0
        public void EnumerateAnnotationsInBox(FBBoundingBox box, FBQuadTreeNode withNode, AnnotationEnumDelegate enumFunc)
        {
            if (!FBUtils.FBBoundingBoxIntersectsBoundingBox(withNode.BoundingBox, box)) {
                return;
            }

            List<IMKAnnotation> tempArray = new List<IMKAnnotation>(withNode.Annotations);

            foreach (IMKAnnotation annotation in tempArray) {
                if (FBUtils.FBBoundingBoxContainsCoordinate(box, annotation.Coordinate)) {
                    enumFunc(annotation);
                }
            }

            if (withNode.IsLeaf()) {
                return;
            }

            EnumerateAnnotationsInBox(box, withNode.NorthEast, enumFunc);
            EnumerateAnnotationsInBox(box, withNode.NorthWest, enumFunc);
            EnumerateAnnotationsInBox(box, withNode.SouthEast, enumFunc);
            EnumerateAnnotationsInBox(box, withNode.SouthWest, enumFunc);
        }
コード例 #2
0
 public void EnumerateAnnotations(AnnotationEnumDelegate enumFunc)
 {
     EnumerateAnnotationsInBox(FBUtils.FBBoundingBoxForMapRect(new MKMapRect().World), _rootNode, enumFunc);
 }
コード例 #3
0
 public void EnumerateAnnotationsInBox(FBBoundingBox box, AnnotationEnumDelegate enumFunc)
 {
     EnumerateAnnotationsInBox(box, _rootNode, enumFunc);
 }
コード例 #4
0
        public void EnumerateAnnotationsInBox(FBBoundingBox box, FBQuadTreeNode withNode, AnnotationEnumDelegate enumFunc)
        {
            if (!FBUtils.FBBoundingBoxIntersectsBoundingBox(withNode.BoundingBox, box))
            {
                return;
            }

            List <IMKAnnotation> tempArray = new List <IMKAnnotation>(withNode.Annotations);

            foreach (IMKAnnotation annotation in tempArray)
            {
                if (FBUtils.FBBoundingBoxContainsCoordinate(box, annotation.Coordinate))
                {
                    enumFunc(annotation);
                }
            }

            if (withNode.IsLeaf())
            {
                return;
            }

            EnumerateAnnotationsInBox(box, withNode.NorthEast, enumFunc);
            EnumerateAnnotationsInBox(box, withNode.NorthWest, enumFunc);
            EnumerateAnnotationsInBox(box, withNode.SouthEast, enumFunc);
            EnumerateAnnotationsInBox(box, withNode.SouthWest, enumFunc);
        }
コード例 #5
0
 public void EnumerateAnnotations(AnnotationEnumDelegate enumFunc)
 {
     EnumerateAnnotationsInBox(FBUtils.FBBoundingBoxForMapRect(new MKMapRect().World), _rootNode, enumFunc);
 }
コード例 #6
0
 public void EnumerateAnnotationsInBox(FBBoundingBox box, AnnotationEnumDelegate enumFunc)
 {
     EnumerateAnnotationsInBox(box, _rootNode, enumFunc);
 }