Browse Source

api fix 2

import/raw
memespring 17 years ago
parent
commit
30ca093bb9
5 changed files with 12 additions and 14 deletions
  1. +1
    -1
      trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php
  2. +1
    -1
      trunk/data/%%F7^F7F^F7F34188%%header.tpl.php
  3. +3
    -4
      trunk/docs/api.php
  4. +1
    -2
      trunk/docs/include/application.php
  5. +6
    -6
      trunk/docs/templates/apihowto.tpl

+ 1
- 1
trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php View File

@@ -1,4 +1,4 @@
<?php /* Smarty version 2.6.16, created on 2007-04-09 17:38:29
<?php /* Smarty version 2.6.16, created on 2007-04-09 17:58:56
compiled from rss.tpl */ ?>
<?php echo '<?xml'; ?>
version="1.0" encoding="UTF-8"<?php echo '?>'; ?>


+ 1
- 1
trunk/data/%%F7^F7F^F7F34188%%header.tpl.php View File

@@ -1,4 +1,4 @@
<?php /* Smarty version 2.6.16, created on 2007-04-09 17:37:29
<?php /* Smarty version 2.6.16, created on 2007-04-09 17:57:48
compiled from header.tpl */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


+ 3
- 4
trunk/docs/api.php View File

@@ -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);
}


+ 1
- 2
trunk/docs/include/application.php View File

@@ -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);
}


+ 6
- 6
trunk/docs/templates/apihowto.tpl View File

@@ -20,8 +20,8 @@
http://www.planningalerts.com/api.php?<strong>call</strong>=postcode<br/>&<strong>postcode</strong>=[some postcode]&<strong>area_size</strong>=['s' 'm' or 'l']</em>
</code>
<p class="apiexamples">
<a href="http://www.planningalerts.com/api.php?lat=51.52277&lng=-0.067281&area_size=l">view example</a>
<a href="http://www.planningalerts.com/api.php?lat=51.52277&lng=-0.067281&area_size=l">view on a map</a>
<a href="http://www.planningalerts.com/api.php?call=postcode&postcode=sw98jx&area_size=l">view example</a>
<a href="http://www.planningalerts.com/api.php?call=postcode&postcode=sw98jx&area_size=l">view on a map</a>
</p>
</div>
@@ -35,8 +35,8 @@
http://www.planningalerts.com/api.php?<strong>call</strong>=point<br/>&<strong>lat</strong>=[some latitude]&<strong>lng</strong>=[some longitude]<strong>area_size</strong>=['s' 'm' or 'l']
</code>
<p class="apiexamples">
<a href="http://www.planningalerts.com/api.php?lat=51.52277&lng=-0.067281&area_size=l">view example</a>
<a href="http://www.planningalerts.com/api.php?lat=51.52277&lng=-0.067281&area_size=l">view on a map</a>
<a href="http://www.planningalerts.com/api.php?call=point&lat=51.52277&lng=-0.067281&area_size=l">view example</a>
<a href="http://maps.google.com/maps?f=q&hl=en&q=http://www.planningalerts.com/api.php%3Fcall%3Dpoint%26lat%3D51.52277%26lng%3D-0.067281%26area_size%3Dl&layer=&ie=UTF8&z=13&om=1">view on a map</a>
</p>
</div>
@@ -50,8 +50,8 @@
http://www.planningalerts.com/api.php?<strong>call</strong>=pointos<br/>&<strong>easting</strong>=[some easting]&<strong>northing</strong>=[some northing]<strong>area_size</strong>=['s' 'm' or 'l']
</code>
<p class="apiexamples">
<a href="http://www.planningalerts.com/api.php?lat=51.52277&lng=-0.067281&area_size=l">view example</a>
<a href="http://www.planningalerts.com/api.php?lat=51.52277&lng=-0.067281&area_size=l">view on a map</a>
<a href="http://www.planningalerts.com/api.php?call=pointos&easting=383480&northing=398000&area_size=m">view example</a>
<a href="http://maps.google.com/maps?f=q&hl=en&q=http://www.planningalerts.com/api.php%3Fcall%3Dpointos%26easting%3D383480%26northing%3D398000%26area_size%3Dm&layer=&ie=UTF8&z=15&om=1">view on a map</a>
</p>
</div>



Loading…
Cancel
Save