File tree 1 file changed +5
-2
lines changed
xoops_trust_path/modules/xpwiki/plugin
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ function plugin_gmap_init () {
162
162
$ this ->cont ['PLUGIN_GMAP_PROFILE ' ] = 'default ' ;
163
163
164
164
// This plugins config
165
- $ this ->conf ['ApiVersion ' ] = '2 ' ;
165
+ $ this ->conf ['ApiVersion ' ] = '3 ' ;
166
166
167
167
if ($ this ->cont ['UA_PROFILE ' ] === 'mobile ' ) {
168
168
$ this ->conf ['StaticMapSizeW ' ] = 480 ;
@@ -934,7 +934,10 @@ function plugin_gmap_get_maptype($type) {
934
934
}
935
935
936
936
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 ' ].'&sensor=true&libraries=places&key= ' .$ key , true , 'UTF-8 ' );
938
941
$ this ->func ->add_tag_head ('gmap.js ' );
939
942
return ;
940
943
}
You can’t perform that action at this time.
0 commit comments