/// <summary> /// Load all the placemark objects that are within the specified radius. /// </summary> /// <param name="google">The Google helper class that does the database leg-work.</param> /// <returns>A collection of Placemark objects inside the radius.</returns> public override List <Placemark> LoadPlacemarks(Google google) { List <Placemark> items = new List <Placemark>(); if (PopulateWith == PopulationType.Individuals) { foreach (Placemark p in google.PersonPlacemarksInRadius(Latitude, Longitude, Distance, 0, Int32.MaxValue)) { items.Add(p); } } else if (PopulateWith == PopulationType.Families) { foreach (Placemark p in google.FamilyPlacemarksInRadius(Latitude, Longitude, Distance, 0, Int32.MaxValue)) { items.Add(p); } } else if (PopulateWith == PopulationType.SmallGroups) { foreach (Placemark p in google.SmallGroupPlacemarksInRadius(Latitude, Longitude, Distance, 0, Int32.MaxValue)) { items.Add(p); } } return(items); }
/// <summary> /// Initialize a new KML object. The object can be rendered right /// away but will be empty and not contain any relevent information. /// </summary> public KML(Google google) { XmlDeclaration xDec; // // Save the google reference as we will need it later. // this.Google = google; pinStyles = new Dictionary <string, string>(); // // Initialize the XML document object. // xmlDoc = new XmlDocument(); xDec = xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", null); xmlDoc.InsertBefore(xDec, xmlDoc.DocumentElement); // // Create the root KML element with the proper namespace. // kmlRoot = xmlDoc.CreateElement("kml", "http://www.opengis.net/kml/2.2"); xmlDoc.AppendChild(kmlRoot); // // The KML document element is the root of all KML data. // kmlDocument = xmlDoc.CreateElement("Document"); kmlRoot.AppendChild(kmlDocument); SetupColorTables(); }
public List <SmallGroupPlacemark> LoadGroupsInArea(int areaid, String start, String count) { Google google; google = new Google(ArenaContext.Current.User, HttpContext.Current.Request.ApplicationPath); return(google.SmallGroupPlacemarksInArea(areaid, (String.IsNullOrEmpty(start) ? 0 : Convert.ToInt32(start)), (String.IsNullOrEmpty(count) ? Int32.MaxValue : Convert.ToInt32(count)))); }
public List <SmallGroupPlacemark> LoadGroupsInRadius(Double latitude, Double longitude, Double distance, String start, String count) { Google google; google = new Google(ArenaContext.Current.User, HttpContext.Current.Request.ApplicationPath); return(google.SmallGroupPlacemarksInRadius(latitude, longitude, distance, (String.IsNullOrEmpty(start) ? 0 : Convert.ToInt32(start)), (String.IsNullOrEmpty(count) ? Int32.MaxValue : Convert.ToInt32(count)))); }
public List <PersonPlacemark> LoadPeopleInReport(String reportid, String start, String count) { Google google; google = new Google(ArenaContext.Current.User, HttpContext.Current.Request.ApplicationPath); return(google.PersonPlacemarksInReport(Convert.ToInt32(reportid), (String.IsNullOrEmpty(start) ? 0 : Convert.ToInt32(start)), (String.IsNullOrEmpty(count) ? Int32.MaxValue : Convert.ToInt32(count)))); }
public string GroupDetailsInfoWindow(String groupID) { Group g; Google google; google = new Google(ArenaContext.Current.User, HttpContext.Current.Request.ApplicationPath); // // Load the person we are trying to retrieve details for. // g = new Group(Convert.ToInt32(groupID)); return(google.SmallGroupDetailsPopup(g, true, true)); }
public string FamilyDetailsInfoWindow(String familyID) { Family f; Google google; google = new Google(ArenaContext.Current.User, HttpContext.Current.Request.ApplicationPath); // // Load the family we are trying to retrieve details for. // f = new Family(Convert.ToInt32(familyID)); return(google.FamilyDetailsPopup(f, true, true)); }
public string PersonDetailsInfoWindow(String personID) { Person p; Google google; google = new Google(ArenaContext.Current.User, HttpContext.Current.Request.ApplicationPath); // // Load the person we are trying to retrieve details for. // p = new Person(new Guid(personID)); return(google.PersonDetailsPopup(p, true, true)); }
/// <summary> /// This method must be overridden by subclasses. The LoadPopulation method is called /// to signal that the loader should return a list of all placemark objects that should /// go onto the map. /// </summary> /// <param name="google">The Google helper class that does the database leg-work.</param> /// <returns>A List of Placemark objects (or it's subclasses).</returns> public abstract List <Placemark> LoadPlacemarks(Google google);