Skip to content

Commit

Permalink
Merge pull request dynamic#87 from jsirish/enhancement/apiKey
Browse files Browse the repository at this point in the history
Google API Key
  • Loading branch information
jsirish committed Apr 8, 2016
2 parents a649028 + 277e004 commit 00088f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/Locator.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,12 @@ public function init()

$themeDir = SSViewer::get_theme_folder();

// google maps api key
$key = Config::inst()->get('GoogleGeocoding', 'google_api_key');

Requirements::javascript('framework/thirdparty/jquery/jquery.js');
if (Locator::getLocations()) {
Requirements::javascript('http://maps.google.com/maps/api/js?sensor=false');
Requirements::javascript('http://maps.google.com/maps/api/js?key='.$key);
Requirements::javascript('locator/thirdparty/handlebars/handlebars-v1.3.0.js');
Requirements::javascript('locator/thirdparty/jquery-store-locator/js/jquery.storelocator.js');
}
Expand Down

0 comments on commit 00088f7

Please sign in to comment.