Fix console error when google or bing maps are used. #270

This commit is contained in:
Korina Cordero 2019-12-04 08:13:24 +00:00
parent e2dd980a2d
commit 505fa86f72
3 changed files with 10 additions and 8 deletions

View file

@ -162,10 +162,10 @@ services:
# map manager
#App\Service\GISManager\Bing: ~
#App\Service\GISManager\OpenStreet: ~
App\Service\GISManager\Google: ~
App\Service\GISManager\OpenStreet: ~
#App\Service\GISManager\Google: ~
#App\Service\GISManagerInterface: "@App\\Service\\GISManager\\Bing"
#App\Service\GISManagerInterface: "@App\\Service\\GISManager\\OpenStreet"
App\Service\GISManagerInterface: "@App\\Service\\GISManager\\Google"
App\Service\GISManagerInterface: "@App\\Service\\GISManager\\OpenStreet"
#App\Service\GISManagerInterface: "@App\\Service\\GISManager\\Google"

View file

@ -41,10 +41,6 @@
crossorigin=""/>
{% endblock %}
<!--end::Extra Styles -->
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"
integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
crossorigin="">
</script>
</head>
<!-- end::Head -->
<!-- end::Body -->

View file

@ -45,12 +45,18 @@
{% block scripts %}
{{ include('map/' ~ map_js_file) }}
<script>
{% if 'OpenStreet' in map_js_file %}
initMap();
{% endif %}
function initMap() {
var default_lat = {% trans %}default_lat{% endtrans %};
var default_lng = {% trans %}default_long{% endtrans %};
var map = mapCreate('dashboard_map', default_lat, default_lng, 'road', 13);
}
</script>
{% endblock %}