diff options
author | bfabiszewski <github@ushuaia.pl> | 2013-06-21 12:44:57 +0200 |
---|---|---|
committer | bfabiszewski <github@ushuaia.pl> | 2013-06-21 12:44:57 +0200 |
commit | 458f1449cb262b73884170b9a0ea6a2b5485cacd (patch) | |
tree | 7df43f9144c4ac49eccc0e482e8e01ab7594b187 | |
parent | 8c9a527fdf9a54699a596e0a6579cc95fb9b4314 (diff) | |
download | RunnerUpLive-458f1449cb262b73884170b9a0ea6a2b5485cacd.zip |
correct Google API key handling
-rwxr-xr-x | index.php | 1 | ||||
-rwxr-xr-x | main.js | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -105,6 +105,7 @@ print var lang_newinterval = "'.$lang_newinterval.'"; var units = "'.$units.'"; var mapapi = "'.$mapapi.'"; + var gkey = '.(isset($gkey)?'"'.$gkey.'"':'null').'; </script> <script type="text/javascript" src="main.js"></script> '; @@ -287,7 +287,7 @@ function loadMapAPI(api) { var url = new Array(); if (api=='gmaps') { url.push('api_gmaps.js'); - url.push('https://maps.googleapis.com/maps/api/js?sensor=false&callback=init'); + url.push('https://maps.googleapis.com/maps/api/js?'+((gkey!==null)?('key='+gkey+'&'):'')+'sensor=false&callback=init'); } else { url.push('api_openlayers.js'); |