Skip to content
Permalink
Browse files

Merge pull request #155 from mbirth/add-what3words-coordinate-output

Add what3words coordinate output
  • Loading branch information...
bohrsty committed Jan 21, 2015
2 parents 905e578 + 7655f53 commit 5c81dd4d016206ffc57116a68ddf87806a7cd805
@@ -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 @@ static function parseRequestLon($name)
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 @@ function getW3W($language = "de")
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>

0 comments on commit 5c81dd4

Please sign in to comment.
You can’t perform that action at this time.