Skip to content

Commit 3f8532e

Browse files
committed
set GoogleMapsAPI version to "3" for fix of ctrl elements problem
1 parent cfeda39 commit 3f8532e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

xoops_trust_path/modules/xpwiki/plugin/gmap.inc.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function plugin_gmap_init () {
162162
$this->cont['PLUGIN_GMAP_PROFILE'] = 'default';
163163

164164
// This plugins config
165-
$this->conf['ApiVersion'] = '2';
165+
$this->conf['ApiVersion'] = '3';
166166

167167
if ($this->cont['UA_PROFILE'] === 'mobile') {
168168
$this->conf['StaticMapSizeW'] = 480;
@@ -934,7 +934,10 @@ function plugin_gmap_get_maptype($type) {
934934
}
935935

936936
function plugin_gmap_init_output($key) {
937-
$this->func->add_js_head('//maps.google.com/maps/api/js?sensor=true&libraries=places&key='.$key, true, 'UTF-8');
937+
if (floatval($this->conf['ApiVersion']) < 3) {
938+
$this->conf['ApiVersion'] = '3';
939+
}
940+
$this->func->add_js_head('//maps.google.com/maps/api/js?v='.$this->conf['ApiVersion'].'&amp;sensor=true&amp;libraries=places&amp;key='.$key, true, 'UTF-8');
938941
$this->func->add_tag_head('gmap.js');
939942
return;
940943
}

0 commit comments

Comments
 (0)