diff --git a/trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php b/trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php index cbc4b85..733ee13 100644 --- a/trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php +++ b/trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php @@ -1,4 +1,4 @@ - version="1.0" encoding="UTF-8"'; ?> diff --git a/trunk/data/%%F7^F7F^F7F34188%%header.tpl.php b/trunk/data/%%F7^F7F^F7F34188%%header.tpl.php index fb3edab..111f209 100644 --- a/trunk/data/%%F7^F7F^F7F34188%%header.tpl.php +++ b/trunk/data/%%F7^F7F^F7F34188%%header.tpl.php @@ -1,4 +1,4 @@ - diff --git a/trunk/docs/api.php b/trunk/docs/api.php index 76b10fa..172f4ba 100644 --- a/trunk/docs/api.php +++ b/trunk/docs/api.php @@ -30,7 +30,6 @@ class api { //get the call type $call = $_GET['call']; - switch ($call) { case "postcode": @@ -78,7 +77,7 @@ class api { } //all good, get the data if(sizeof($this->warnings) == 0){ - $this->applications = Applications::query($_GET['easting'], $_GET['$northing'], alert_size_to_meters($_GET['area_size'])); + $this->applications = Applications::query($_GET['easting'], $_GET['northing'], alert_size_to_meters($_GET['area_size'])); } break; case "authority": @@ -101,9 +100,9 @@ class api { //all good, get the data if(sizeof($this->warnings) == 0){ $bottom_left_latlng = new LatLng($_GET['bottom_left_lat'], $_GET['bottom_left_lng']); - $bottom_left_xy = $latlng->toOSRef(); + $bottom_left_xy = $bottom_left_latlng->toOSRef(); $top_right_latlng = new LatLng($_GET['bottom_left_lat'], $_GET['bottom_left_lng']); - $top_right_xy = $latlng->toOSRef(); + $top_right_xy = $top_right_latlng->toOSRef(); $this->applications = Applications::query_area($bottom_left_xy->easting, $bottom_left_xy->northing, $top_right_xy->easting, $top_right_xy->northing); } diff --git a/trunk/docs/include/application.php b/trunk/docs/include/application.php index 27e3317..e2c5293 100644 --- a/trunk/docs/include/application.php +++ b/trunk/docs/include/application.php @@ -114,7 +114,7 @@ class Applications{ where application.x > " . $db->quote($x - $d) . " and application.x < " . $db->quote($x + $d) . " and application.y > " . $db->quote($y - $d) . " and application.y < " . $db->quote($y + $d) . " order by date_scraped desc limit 100"; - +print $sql; exit; $application_results = $db->getAll($sql); return applications::load_applications($application_results); } @@ -128,7 +128,6 @@ class Applications{ where application.x > " . $db->quote($x1) . " and application.x < " . $db->quote($x2) . " and application.y > " . $db->quote($y1) . " and application.y < " . $db->quote($y2) . " order by date_scraped desc limit 100"; - $application_results = $db->getAll($sql); return applications::load_applications($application_results); } diff --git a/trunk/docs/templates/apihowto.tpl b/trunk/docs/templates/apihowto.tpl index f4f2924..dc486ea 100644 --- a/trunk/docs/templates/apihowto.tpl +++ b/trunk/docs/templates/apihowto.tpl @@ -20,8 +20,8 @@ http://www.planningalerts.com/api.php?call=postcode
&postcode=[some postcode]&area_size=['s' 'm' or 'l']

- view example - view on a map + view example + view on a map

@@ -35,8 +35,8 @@ http://www.planningalerts.com/api.php?call=point
&lat=[some latitude]&lng=[some longitude]area_size=['s' 'm' or 'l']

- view example - view on a map + view example + view on a map

@@ -50,8 +50,8 @@ http://www.planningalerts.com/api.php?call=pointos
&easting=[some easting]&northing=[some northing]area_size=['s' 'm' or 'l']

- view example - view on a map + view example + view on a map