Moved what3words API Key to settings.inc.php. Added links.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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();
|
||||
|
@@ -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
|
||||
|
@@ -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']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user