memespring пре 17 година
родитељ
комит
9789ee5864
4 измењених фајлова са 16 додато и 3 уклоњено
  1. +1
    -1
      data/%%AD^AD7^AD71B708%%rss.tpl.php
  2. +12
    -0
      docs/api.php
  3. +1
    -0
      docs/include/application.php
  4. +2
    -2
      docs/templates/apihowto.tpl

+ 1
- 1
data/%%AD^AD7^AD71B708%%rss.tpl.php Прегледај датотеку

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


+ 12
- 0
docs/api.php Прегледај датотеку

@@ -107,6 +107,18 @@ class api {
$this->applications = Applications::query_area($bottom_left_xy->easting, $bottom_left_xy->northing, $top_right_xy->easting, $top_right_xy->northing);
}
break;
case "areaos":
//validation
if(!isset($_GET['bottom_left_easting']) || !isset($_GET['bottom_left_northing']) || !isset($_GET['top_right_easting']) || !isset($_GET['top_right_northing'])){
array_push($this->warnings, "Bounding box was not specified");
}

//all good, get the data
if(sizeof($this->warnings) == 0){
$this->applications = Applications::query_area($_GET['bottom_left_easting'], $_GET['bottom_left_northing'], $_GET['top_right_easting'], $_GET['top_right_easting']);
}
break;
default:
$this->warnings = "No call type specified";
}


+ 1
- 0
docs/include/application.php Прегледај датотеку

@@ -120,6 +120,7 @@ class Applications{
//by area
function query_area($x1,$y1,$x2,$y2) {

$db = DB::connect(DB_CONNECTION_STRING);
$sql = "select council_reference, address, postcode, description, info_url, comment_url, map_url, x, y, date_recieved, full_name
from application


+ 2
- 2
docs/templates/apihowto.tpl Прегледај датотеку

@@ -65,8 +65,8 @@
http://www.planningalerts.com/api.php?<strong>call</strong>=area<br/>&<strong>bottom_left_lat</strong>=[some latitude]&<strong>bottom_left_lng</strong>=[some longitude]&<strong>top_right_lat</strong>=[some latitude]&<strong>top_right_lng</strong>=[some longitude]
</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=area&bottom_left_lat=51.52277&bottom_left_lng=-0.067281&top_right_lat=52.52277&top_right_lng=15">view example</a>
<a href="http://maps.google.com/maps?f=q&hl=en&q=http://www.planningalerts.com/api.php%3Fcall%3Darea%26bottom_left_lat%3D51.52277%26bottom_left_lng%3D-0.067281%26top_right_lat%3D52.52277%26top_right_lng%3D15&layer=&ie=UTF8&z=8&om=1">view on a map</a>
</p>
</div>


Loading…
Откажи
Сачувај