// checks if given area is sub area of current area instance public bool contains(Area area) { return(this.topLeftLatitude >= area.getTopLeftLatitude() && this.topLeftLongitude <= area.getTopLeftLongitude() && this.bottomRightLatitude <= area.getBottomRightLatitude() && this.bottomRightLongitude >= area.getBottomRightLongitude()); }
// checks if given area is sub area of current area instance public bool contains(Area area) { return this.topLeftLatitude >= area.getTopLeftLatitude() && this.topLeftLongitude <= area.getTopLeftLongitude() && this.bottomRightLatitude <= area.getBottomRightLatitude() && this.bottomRightLongitude >= area.getBottomRightLongitude(); }
// create bigger area for cache private Area newCacheArea(Area area) { double deltaLatitude = Math.Abs(area.getTopLeftLatitude() - area.getBottomRightLatitude()); double deltaLongitude = Math.Abs(area.getTopLeftLongitude() - area.getBottomRightLongitude()); double topLeftLatitude = area.getTopLeftLatitude() + this.cacheFactor * deltaLatitude; double topLeftLongitude = area.getTopLeftLongitude() - this.cacheFactor * deltaLongitude; double bottomRightLatitude = area.getBottomRightLatitude() - this.cacheFactor * deltaLatitude; double bottomRightLongitude = area.getBottomRightLongitude() + this.cacheFactor * deltaLongitude; return new Area(topLeftLatitude, topLeftLongitude, bottomRightLatitude, bottomRightLongitude); }
public String getPois(Area area) { string portalUrl = this.config.get("portal_url"); string mobappid = this.config.get("mobappid"); string areaStr = area.getTopLeftLatitude() + "," + area.getTopLeftLongitude() + "," + area.getBottomRightLatitude() + "," + area.getBottomRightLongitude(); string queryString = portalUrl + "/pois/area/" + areaStr + "/lang/pl/?mobappid=" + mobappid; Debug.WriteLine("getPois: queryString: " + queryString, ToString()); return GET(new Uri(queryString)); }