Ejemplo n.º 1
0
 public bool Contains(IGeoPerimeter bounds)
 {
     if (Contains(bounds.Center))
     {
         return(true);
     }
     else if (Contains(bounds.NorthWest))
     {
         return(true);
     }
     else if (Contains(bounds.SouthEast))
     {
         return(true);
     }
     else if (Contains(new GeoPosition(bounds.NorthWest.Latitude, bounds.SouthEast.Longitude)))
     {
         return(true);
     }
     else if (Contains(new GeoPosition(bounds.SouthEast.Latitude, bounds.NorthWest.Longitude)))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
 /// <summary>
 /// List all places which are within the given bounds
 /// </summary>
 public List <CartoPlaceInfo> ListPlacesContainedInBounds(IGeoPerimeter bounds)
 {
     return(_cache.All.Where(x => bounds.Contains(x.Bounds)).ToList());
 }