Commit 9bd2a012 authored by Chris Rohrer's avatar Chris Rohrer Committed by Zenon Mousmoulas

Add Google API key value to javascript scripts. Remove sensor option, as it is...

Add Google API key value to javascript scripts. Remove sensor option, as it is not needed anymore. For additional info, see https://developers.google.com/maps/documentation/javascript/get-api-key#key
parent 462aec17
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% load i18n %} {% load i18n %}
{% block extrajs %} {% block extrajs %}
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key={{ API_KEY }}"></script>
{% endblock %} {% endblock %}
{% block homeactive %}{% endblock %} {% block homeactive %}{% endblock %}
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
{% block extrajs %} {% block extrajs %}
<script type="text/javascript" src="{% static 'js/showpass.js' %}"></script> <script type="text/javascript" src="{% static 'js/showpass.js' %}"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key={{ API_KEY }}"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
$('#id_secret').showPassword(); $('#id_secret').showPassword();
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
width: auto !important; width: auto !important;
} }
</style> </style>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key={{ API_KEY }}"></script>
<script type="text/javascript"> <script type="text/javascript">
var map = ''; var map = '';
var lat = "{{service.latitude}}"; var lat = "{{service.latitude}}";
......
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
{% block extrajs %} {% block extrajs %}
<script type="text/javascript" src="{% static 'js/jquery.formset.js' %}"></script> <script type="text/javascript" src="{% static 'js/jquery.formset.js' %}"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v=3.exp&sensor=true&language=en&libraries=places"></script> <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v=3.exp&key={{ API_KEY }}&language=en&libraries=places"></script>
<script src="{% static 'js/jquery_csrf_protect.js' %}" type="text/javascript"></script> <script src="{% static 'js/jquery_csrf_protect.js' %}" type="text/javascript"></script>
<script type="text/javascript"> <script type="text/javascript">
......
...@@ -89,6 +89,6 @@ ...@@ -89,6 +89,6 @@
{% block extrajs %} {% block extrajs %}
<script type="text/javascript" src="{% static 'js/markerclusterer.js' %}"></script> <script type="text/javascript" src="{% static 'js/markerclusterer.js' %}"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key={{ API_KEY }}"></script>
<script type="text/javascript" src="{% static 'js/management-map.js' %}"></script> <script type="text/javascript" src="{% static 'js/management-map.js' %}"></script>
{% endblock %} {% endblock %}
...@@ -40,6 +40,6 @@ ...@@ -40,6 +40,6 @@
{% endblock %} {% endblock %}
{% block extrajs %} {% block extrajs %}
<script type="text/javascript" src="//maps.google.com/maps/api/js?v=3.exp&language=en&libraries=places"></script> <script type="text/javascript" src="//maps.google.com/maps/api/js?key={{ API_KEY }}&v=3.exp&language=en&libraries=places"></script>
<script type="text/javascript" src="{% static 'js/geolocate.js' %}"></script> <script type="text/javascript" src="{% static 'js/geolocate.js' %}"></script>
{% endblock %} {% endblock %}
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
{% block extrajs %} {% block extrajs %}
<script type="text/javascript" src="{% static 'js/markerclusterer.js' %}"></script> <script type="text/javascript" src="{% static 'js/markerclusterer.js' %}"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&region={{COUNTRY_CODE}}"></script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&region={{COUNTRY_CODE}}&key={{ API_KEY }}"></script>
<script type="text/javascript" src="{% static 'js/jquery.adapt_height.js' %}"></script> <script type="text/javascript" src="{% static 'js/jquery.adapt_height.js' %}"></script>
<script type="text/javascript" src="{% static 'js/mapescape.js' %}"></script> <script type="text/javascript" src="{% static 'js/mapescape.js' %}"></script>
<script type="text/javascript" src="{% static 'js/home-page-map.js' %}"></script> <script type="text/javascript" src="{% static 'js/home-page-map.js' %}"></script>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
{% block extrajs %} {% block extrajs %}
<script type="text/javascript" src="{% static 'js/markerclusterer.js' %}"></script> <script type="text/javascript" src="{% static 'js/markerclusterer.js' %}"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&region={{COUNTRY_CODE}}"></script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&region={{COUNTRY_CODE}}&key={{ API_KEY }}"></script>
<script type="text/javascript" src="{% static 'js/jquery.adapt_height.js' %}"></script> <script type="text/javascript" src="{% static 'js/jquery.adapt_height.js' %}"></script>
<script type="text/javascript" src="{% static 'js/mapescape.js' %}"></script> <script type="text/javascript" src="{% static 'js/mapescape.js' %}"></script>
<script type="text/javascript" src="{% static 'js/world-map.js' %}"></script> <script type="text/javascript" src="{% static 'js/world-map.js' %}"></script>
......
...@@ -11,7 +11,8 @@ def country_code(context): ...@@ -11,7 +11,8 @@ def country_code(context):
'MAP_CENTER': settings.MAP_CENTER, 'MAP_CENTER': settings.MAP_CENTER,
'PROV_TEAM': settings.NRO_PROV_BY_DICT, 'PROV_TEAM': settings.NRO_PROV_BY_DICT,
'SOCIAL_MEDIA_LIST': settings.NRO_PROV_SOCIAL_MEDIA_CONTACT, 'SOCIAL_MEDIA_LIST': settings.NRO_PROV_SOCIAL_MEDIA_CONTACT,
'VERSION': settings.SW_VERSION 'VERSION': settings.SW_VERSION,
'API_KEY': settings.GOOGLE_API_KEY
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment