From ece4e6dd4d1ba0025032aeab50bb354835419ce5 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Sat, 18 Jan 2020 22:45:40 +0800 Subject: [PATCH] Add MQTT subscribe functionality in main dashboard #299 --- templates/home.html.twig | 43 +++++++++++++++++++++++++----- templates/map/initOpenStreetMap.js | 2 ++ 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/templates/home.html.twig b/templates/home.html.twig index c6b95597..bd7f9746 100644 --- a/templates/home.html.twig +++ b/templates/home.html.twig @@ -10,13 +10,10 @@ {% endblock %} -{% block scripts %} -{{ include('map/' ~ map_js_file) }} - + {% endblock %} - diff --git a/templates/map/initOpenStreetMap.js b/templates/map/initOpenStreetMap.js index 59a8ebcf..a8917f2a 100644 --- a/templates/map/initOpenStreetMap.js +++ b/templates/map/initOpenStreetMap.js @@ -120,4 +120,6 @@ function mapCreate(div_id, center_lat, center_lng, map_type, zoom) { return map; } +initMap(); +