correct Google API key handling
This commit is contained in:
parent
8c9a527fdf
commit
458f1449cb
@ -105,6 +105,7 @@ print
|
|||||||
var lang_newinterval = "'.$lang_newinterval.'";
|
var lang_newinterval = "'.$lang_newinterval.'";
|
||||||
var units = "'.$units.'";
|
var units = "'.$units.'";
|
||||||
var mapapi = "'.$mapapi.'";
|
var mapapi = "'.$mapapi.'";
|
||||||
|
var gkey = '.(isset($gkey)?'"'.$gkey.'"':'null').';
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="main.js"></script>
|
<script type="text/javascript" src="main.js"></script>
|
||||||
';
|
';
|
||||||
|
2
main.js
2
main.js
@ -287,7 +287,7 @@ function loadMapAPI(api) {
|
|||||||
var url = new Array();
|
var url = new Array();
|
||||||
if (api=='gmaps') {
|
if (api=='gmaps') {
|
||||||
url.push('api_gmaps.js');
|
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 {
|
else {
|
||||||
url.push('api_openlayers.js');
|
url.push('api_openlayers.js');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user