diff --git a/helpers/config.php b/helpers/config.php
index d0ec179..7350a8d 100644
--- a/helpers/config.php
+++ b/helpers/config.php
@@ -25,6 +25,9 @@ class uConfig {
// (gmaps = google maps, openlayers = openlayers/osm)
static $mapapi = "openlayers";
+ // gmaps key
+ static $gkey = null;
+
// openlayers additional map layers
// OpenCycleMap (0 = no, 1 = yes)
static $layer_ocm = 1;
@@ -91,6 +94,7 @@ class uConfig {
include_once($configFile);
if (isset($mapapi)) { self::$mapapi = $mapapi; }
+ if (isset($gkey)) { self::$gkey = $gkey; }
if (isset($layer_ocm)) { self::$layer_ocm = $layer_ocm; }
if (isset($layer_mq)) { self::$layer_mq = $layer_mq; }
if (isset($layer_osmapa)) { self::$layer_osmapa = $layer_osmapa; }
diff --git a/index.php b/index.php
index efee265..d35c1c4 100755
--- a/index.php
+++ b/index.php
@@ -175,7 +175,7 @@ print '
var lang_submit = "' . $lang_submit . '";
var units = "' . $config::$units . '";
var mapapi = "' . $config::$mapapi . '";
- var gkey = ' . (isset($gkey) ? '"' . $gkey . '"' : 'null') . ';
+ var gkey = ' . (!empty($config::$gkey) ? '"' . $config::$gkey . '"' : 'null') . ';
var layer_ocm = "' . $config::$layer_ocm . '";
var layer_mq = "' . $config::$layer_mq . '";
var layer_osmapa = "' . $config::$layer_osmapa . '";
@@ -186,7 +186,7 @@ print '
';
if ($config::$mapapi == "gmaps") {
- print '
+ print '
';
} else {