diff --git a/static/js/map.js b/static/js/map.js index 82af2b8f2e894690c559b6bc135152be491ad988..e3ac8a247f525229be6077d7cc3b8d8133b109a2 100644 --- a/static/js/map.js +++ b/static/js/map.js @@ -33,7 +33,7 @@ BusMap.Map = function(opts) { // Go to view requested by URL hash (if set) var viewOk = that.setViewFromUrlHash(); - if (!viewOk) { + if (!viewOk && !that.opts.embed) { // Restore the user's last view (if exists). lastViewRecover(); } diff --git a/templates/map.html b/templates/map.html index 66160ba2db1b45caad83fcdd28b6fb331346ef8f..e808ae4cd4ac60fa5f920d3a68a14dd7655f66a2 100644 --- a/templates/map.html +++ b/templates/map.html @@ -99,7 +99,7 @@ vehicles: 5, }, }); - + {% if not embed %} // Put "About" link into the attribution box $(".leaflet-control-attribution") .html('<a id="show-about" href="javascript:void(0)">About</a>'); @@ -122,6 +122,7 @@ timeout: 3000, }); }); + {% endif %} </script> {% endblock %}