Skip to content
Permalink
Browse files
set GoogleMapsAPI version to "3" for fix of ctrl elements problem
  • Loading branch information
nao-pon committed Sep 26, 2014
1 parent cfeda39 commit 3f8532e
Showing 1 changed file with 5 additions and 2 deletions.
@@ -162,7 +162,7 @@ function plugin_gmap_init () {
$this->cont['PLUGIN_GMAP_PROFILE'] = 'default';

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

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

function plugin_gmap_init_output($key) {
$this->func->add_js_head('//maps.google.com/maps/api/js?sensor=true&libraries=places&key='.$key, true, 'UTF-8');
if (floatval($this->conf['ApiVersion']) < 3) {
$this->conf['ApiVersion'] = '3';
}
$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');
$this->func->add_tag_head('gmap.js');
return;
}

0 comments on commit 3f8532e

Please sign in to comment.