Skip to content

Commit

Permalink
Merge pull request #5505 from SahAssar/release/2.2
Browse files Browse the repository at this point in the history
Add google maps api key option
  • Loading branch information
GwendolenLynch committed Jul 4, 2016
2 parents ddb7daa + 03cf554 commit d440436
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/config/config.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ wysiwyg:
allowNbsp: false # If set to 'false', the editor will strip out ` ` characters. If set to 'true', it will allow them. ¯\_(ツ)_/¯
# viewSourceRoles: [ 'admin', 'developer' ] # The roles which are allowed to use the [Source]-button.

# Bolt uses the Google maps API for it's geolocation field and Google now
# requires that it be loaded with an API key on new domains. You can generate
# a key at https://console.developers.google.com and enter it here to make sure
# that the geolocation field work.
# google_api_key:

# Global option to enable/disable the live editor
liveeditor: true

Expand Down
2 changes: 1 addition & 1 deletion app/view/twig/editcontent/_includes-data.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

{% if 'geolocation' in used_fieldtypes %}
{{ data('field.geolocation.title-pin', __('field.geolocation.title-pin')) }}
<script src="https://maps.google.com/maps/api/js?sensor=false"></script>
<script src="https://maps.google.com/maps/api/js?sensor=false{{app.config.get('google_api_key') ? '&key=' ~ app.config.get('google_api_key') : '' }}"></script>
{% endif %}

{% if 'slug' in used_fieldtypes %}
Expand Down

0 comments on commit d440436

Please sign in to comment.