diff --git a/trunk/docs/api.php b/trunk/docs/api.php index 332b0f9..95092e1 100644 --- a/trunk/docs/api.php +++ b/trunk/docs/api.php @@ -41,13 +41,15 @@ class api { //Get OS ref from postcode if (isset($_GET['postcode'])) { $xy = postcode_to_location($_GET['postcode']); + $this->easting = $xy[0]; + $this->northing = $xy[1]; } else { $latlng = new LatLng($_GET['lat'], $_GET['lng']); $xy = $latlng->toOSRef(); + $this->easting = $xy->easting; + $this->northing = $xy->northing; } - $this->easting = $xy->easting; - $this->northing = $xy->northing; $this->area_size = $_GET['area_size']; $this->applications = Applications::query($this->easting, $this->northing, alert_size_to_meters($this->area_size)); diff --git a/trunk/docs/scrapers/cityoflondon.php b/trunk/docs/scrapers/cityoflondon.php index 5b4a1d3..5c262ad 100644 --- a/trunk/docs/scrapers/cityoflondon.php +++ b/trunk/docs/scrapers/cityoflondon.php @@ -15,13 +15,13 @@ if (isset($_GET['year'])){ } //search url - $search_url = "http://www.planning.cityoflondon.gov.uk/dc/DcApplication/application_searchresults.aspx?searchtype=WEEKLY&selWeeklyListRange=#daterange&weektype=VAL"; + $search_url = "http://www.planning.cityoflondon.gov.uk/PublicAccess/tdc/DcApplication/application_searchresults.aspx?searchtype=WEEKLY&selWeeklyListRange=#daterange&weektype=VAL"; $date_range = "{$day}%2F{$month}%2F{$year}%7C{$day}%2F{$month}%2F{$year}"; $search_url = str_replace("#daterange", $date_range, $search_url); //comment and info urls - $info_url_base = "http://www.planning.cityoflondon.gov.uk/dc/DcApplication/application_detailview.aspx?caseno="; - $comment_url_base = "http://www.planning.cityoflondon.gov.uk/dc/DcApplication/application_comments_entryform.aspx?caseno="; + $info_url_base = "http://www.planning.cityoflondon.gov.uk/PublicAccess/tdc/DcApplication/application_detailview.aspx?caseno="; + $comment_url_base = "http://www.planning.cityoflondon.gov.uk/PublicAccess/tdc/DcApplication/application_comments_entryform.aspx?caseno="; //grab urls $applications = scrape_applications_publicaccess($search_url, $info_url_base, $comment_url_base); diff --git a/trunk/docs/templates/apihowto.tpl b/trunk/docs/templates/apihowto.tpl index 28d6012..58a8162 100644 --- a/trunk/docs/templates/apihowto.tpl +++ b/trunk/docs/templates/apihowto.tpl @@ -2,7 +2,7 @@

PlanningAlerts.com API

- Planning application data is available programmatically as GeoRSS feeds. GeoRSS can be used in most all web mapping APIs and desktop GIS software, and in services like mapufacture and Yahoo Pipes. + Planning application data is available programmatically as GeoRSS feeds. GeoRSS can be used in almost most all web mapping APIs and desktop GIS software, and in services like mapufacture and Yahoo Pipes.

diff --git a/trunk/docs/templates/rss.tpl b/trunk/docs/templates/rss.tpl index 2db1a97..4d98009 100644 --- a/trunk/docs/templates/rss.tpl +++ b/trunk/docs/templates/rss.tpl @@ -1,11 +1,12 @@ - + - Search Results + PlanningAlerts.com http://www.planningalerts.com/ {foreach name="applications" from="$applications" item="application"} + {$application->address} {$application->council_reference} {$application->address} {$application->lat} {$application->lon}