Moved what3words API Key to settings.inc.php. Added links.

This commit is contained in:
2015-01-20 23:41:47 +01:00
parent ad039dd69b
commit aa0bf49cb2
5 changed files with 15 additions and 5 deletions

View File

@@ -110,6 +110,9 @@
$opt['lib']['garmin']['url'] = 'http://local.opencaching.de/';
$opt['lib']['garmin']['redirect'] = $opt['lib']['garmin']['url'] . 'garmin.php?redirect=1&cacheid={cacheid}';
// developer.what3words.com API Key
$opt['lib']['w3w']['apikey'] = 'YOURAPIKEY';
// other settings
$opt['page']['showdonations'] = true;
$opt['page']['showsocialmedia'] = true;

View File

@@ -581,6 +581,9 @@
// (e.g. domain called without www. prefix) - must match domain of $opt['lib']['garmin']['url']
$opt['lib']['garmin']['redirect'] = 'http://www.site.org/garmin.php?redirect=1&cacheid={cacheid}';
// developer.what3words.com API key
$opt['lib']['w3w']['apikey'] = 'YOURAPIKEY';
// Google Maps API key
// http://code.google.com/intl/de/apis/maps/signup.html
$opt['lib']['google']['mapkey'] = array();

View File

@@ -141,6 +141,9 @@
$opt['lib']['garmin']['key'] = '00112233445566778899AABBCCDDEEFF00';
$opt['lib']['garmin']['url'] = 'http://www.site.org/';
// developer.what3words.com API Key
$opt['lib']['w3w']['apikey'] = 'YOURAPIKEY';
$opt['logic']['node']['id'] = 4;
// Google Maps API key

View File

@@ -9,7 +9,6 @@ class coordinate
{
var $nLat = 0;
var $nLon = 0;
var $w3wApiKey = 'MVPP32BC'; // what3words.com
function __construct($nNewLat, $nNewLon)
{
@@ -557,8 +556,10 @@ class coordinate
function getW3W($language = "de")
{
global $opt;
$params = array(
'key' => $this->w3wApiKey,
'key' => $opt['lib']['w3w']['apikey'],
'position' => sprintf('%f,%f', $this->nLat, $this->nLon),
'lang' => $language,
);
@@ -580,4 +581,4 @@ class coordinate
return implode('.', $json['words']);
}
}
?>
?>

View File

@@ -47,9 +47,9 @@
{/if}
<div style="margin-top:4px;">
<p style="color: 5890a8"><b>what3words</b> <small>(deutsch)</small><br />
{$coordW3Wde|escape}</p>
<a href="http://w3w.co/{$coordW3Wde|escape}">{$coordW3Wde|escape}</a></p>
</div>
<div style="margin-top:4px;">
<p style="color: 5890a8"><b>what3words</b> <small>(english)</small><br />
{$coordW3Wen|escape}</p>
<a href="http://w3w.co/{$coordW3Wen|escape}">{{$coordW3Wen|escape}</a></p>
</div>