public RadialSearchRequest(string url, float radius, Location location) : base(url, "radial_search")
		{
			this.Parameters.Add("component", GetRequestAbstract.RequestComponents);
			this.Parameters.Add("lat", location.Latitude.ToString(FormatFloat));
			this.Parameters.Add("lon", location.Longitude.ToString(FormatFloat));
			this.Parameters.Add("radius", radius.ToString());
		}
		public BBoxSearchRequest(string url, Location northWest, Location southEast) : base(url, "bbox_search.php")
		{
			Parameters.Add("component", GetRequestAbstract.RequestComponents);
			Parameters.Add("north", northWest.Latitude.ToString(FormatFloat));
			Parameters.Add("west", northWest.Longitude.ToString(FormatFloat));
			Parameters.Add("south", southEast.Latitude.ToString(FormatFloat));
			Parameters.Add("east", southEast.Longitude.ToString(FormatFloat));
		}
		public BBoxSearchRequest(string url, Location northWest, Location southEast, int maxResults) : this(url, northWest, southEast)
		{
			Parameters.Add("max_results", maxResults.ToString());

		}
		/// <summary>
		/// Gets the distance in Kilometers between two Locations
		/// </summary>
		/// <param name="p1">Location 1</param>
		/// <param name="p2">Location 2</param>
		public static double Distance (Location p1, Location p2)
		{
			double R = 6371.0; // earth mean radius
			double t1 = Degree2Radian (p1.Latitude);
			double t2 = Degree2Radian (p2.Latitude);
			double dt = Degree2Radian (p2.Latitude - p1.Latitude);
			double ds = Degree2Radian (p2.Longitude - p1.Longitude);
			double a = Math.Sin (dt / 2.0) * Math.Sin (dt / 2.0) + 
				Math.Cos (t1) * Math.Cos (t2) *
				Math.Sin (ds / 2.0) * Math.Sin (ds / 2.0);
			double c = 2.0 * Math.Atan2 (Math.Sqrt (a), Math.Sqrt (1.0 - a));

			return R * c;
		}
		public void TestLocation ()
		{
			var location = new Location (52.365299224853516, 9.6899404525756836, 0);

			string jsonLocation = @"{""wgs84"":{""latitude"":52.365299224853516,""longitude"":9.6899404525756836}}";

			var locationObject = MiniJSON.Json.Deserialize (jsonLocation);
			var locationDeserialized = new Location (locationObject);
			Assert.AreEqual (locationDeserialized, location);

			var locationSerialized = location.ToDictionary ();
			var locationJsonSerialized = MiniJSON.Json.Serialize (locationSerialized);
			Assert.AreEqual (jsonLocation, locationJsonSerialized);
		}
		public RadialSearchRequest(string url, float radius, Location location, string category) : this(url, radius, location)
		{
			this.Parameters.Add("category", category);
		}
		public RadialSearchRequest(string url, float radius, Location location, int maxResults) : this(url, radius, location)
		{
			this.Parameters.Add("max_results", maxResults.ToString());
		}
		/// <summary>
		/// Radial search of PoIs around a location coordinates
		/// </summary>
		/// <returns>The search results as a list of PoI</returns>
		/// <param name="l">Location (lat, lon)</param>
		/// <param name="radius">Radius of the search</param>
		/// <param name="category">category filter</param>
		public PoIInfoList RadialSearch (Location l, float radius, string category)
		{
			string request = new RadialSearchRequest(_poiUrl, radius, l, category);
			return GetPoIList(request);
		}
		/// <summary>
		/// Radial search of PoIs around a location coordinates
		/// </summary>
		/// <returns>The search results as a list of PoI</returns>
		/// <param name="l">Location (lat, lon)</param>
		/// <param name="radius">Radius of the search</param>
		/// <param name="maxResults">Max results</param>
		public PoIInfoList RadialSearch (Location l, float radius, int maxResults)
		{
			string request = new RadialSearchRequest(_poiUrl, radius, l, maxResults);
			return GetPoIList(request);
		}
		/// <summary>
		/// Bounding box search
		/// </summary>
		/// <returns>The list of pois found</returns>
		/// <param name="northWest">North west corner</param>
		/// <param name="southEast">South east corner</param>
		/// <param name="maxResults">Max results</param>
		public PoIInfoList BBoxSearch(Location northWest, Location southEast, int maxResults)
		{
			string request = new BBoxSearchRequest(_poiUrl, northWest, southEast, maxResults);
			return GetPoIList(request);
		}