Browse Source

getterrain.php output variable names now same as GIS API output. (issue #3)

master
Skylar Ittner 5 years ago
parent
commit
1c5483b3c2
  1. 6
      getterrain.php
  2. 0
      nearby.php

6
getterrain.php

@ -4,17 +4,17 @@ require 'required.php';
require 'onlyloggedin.php';
require 'latlong_validate.php';
$terrain = json_decode(file_get_contents("http://gis.terranquest.net/terrain.php?key=" . GIS_API_KEY . "&lat=" . $VARS['lat'] . "&long=" . $VARS['long']));
$terrain = json_decode(file_get_contents("http://gis.terranquest.net/terrain.php?key=" . GIS_API_KEY . "&lat=" . $VARS['lat'] . "&long=" . $VARS['long']), TRUE);
if (!is_empty($terrain['error'])) {
sendError($terrain['error'], true);
} else {
$out = [
"status" => "OK",
"typeid" => $terrain['type'],
"type" => $terrain['type'],
"latitude" => $terrain['latitude'],
"longitude" => $terrain['longitude'],
"typename" => $terrain['name']
"name" => $terrain['name']
];
die(json_encode($out));
}

0
proximity.php → nearby.php