Skip to content

Commit

Permalink
Google API Key
Browse files Browse the repository at this point in the history
uses config from GoogleGeocoding in Addressable

fixes dynamic#85
  • Loading branch information
jsirish committed Apr 8, 2016
1 parent a649028 commit 277e004
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 277e004

Please sign in to comment.