public IGPSBounds Union(IGPSBounds area1, IGPSBounds area2) { if (area1 != null && area2 != null) { area1 = area1.Union(area2); } else { //At least one of the areas is null if (area2 != null) { area1 = area2; } } return(area1); }
public static IGPSBounds getGPSBounds(IDictionary <string, MapPolyline> polylines) { IGPSBounds area = null; foreach (MapPolyline m in polylines.Values) { GPSBounds area2 = GPSBounds.FromGPSPoints(m.Locations); if (area2 != null) { if (area == null) { area = area2; } else { area = (GPSBounds)area.Union(area2); } } } return(area); }
public IGPSBounds Union(IGPSBounds area1, IGPSBounds area2) { if (area1 != null && area2 != null) { area1 = area1.Union(area2); } else { //At least one of the areas is null if (area2 != null) { area1 = area2; } } return area1; }