Skip to content

Commit 703cf3d

Browse files
committed
[smarcet]
* fixed duplicated google maps lib ref
1 parent 2edba60 commit 703cf3d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

openstack/code/utils/GoogleMaps/GoogleMapScriptBuilder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ public static function renderRequirements($sensor = null, $version = null){
2525

2626
if(!defined('GOOGLE_MAP_KEY'))
2727
throw new InvalidArgumentException('you must provide a valid google maps api key (GOOGLE_MAP_KEY) !');
28-
29-
Requirements::javascript(Director::protocol()."maps.googleapis.com/maps/api/js?sensor=false");
28+
// base url
3029
$google_map_lib_url = sprintf(Director::protocol()."maps.googleapis.com/maps/api/js?key=%s", GOOGLE_MAP_KEY);
30+
3131
if(!empty($sensor)){
3232
$google_map_lib_url .= "&sensor=".$sensor;
3333
}
34+
3435
if(!empty($version)){
3536
$google_map_lib_url .= "&v=".$version;
3637
}
38+
3739
Requirements::javascript($google_map_lib_url);
3840
}
3941

0 commit comments

Comments
 (0)