diff options
author | Chris Schlaeger <chris@linux.com> | 2016-10-23 13:45:21 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2016-10-23 13:45:21 +0200 |
commit | 799e20f9d44aa2d76243f899b7a4b6f43864ffe5 (patch) | |
tree | f28f9234d2e4c4263ede300c2edf60438a99e9de | |
parent | cca33347735acea80237ca7daaf5e0995994a5e3 (diff) | |
download | postrunner-799e20f9d44aa2d76243f899b7a4b6f43864ffe5.zip |
Fix: Some users report that the map wasn't rendered.
While the actual root cause is still unknown, this is an attempt to
fix it.
-rw-r--r-- | lib/postrunner/TrackView.rb | 9 | ||||
-rw-r--r-- | lib/postrunner/ViewFrame.rb | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/postrunner/TrackView.rb b/lib/postrunner/TrackView.rb index ff1f0be..3500972 100644 --- a/lib/postrunner/TrackView.rb +++ b/lib/postrunner/TrackView.rb @@ -39,16 +39,19 @@ module PostRunner doc.link({ 'rel' => 'stylesheet', 'href' => 'openlayers/ol.css', 'type' => 'text/css' }) - doc.script({ 'src' => 'openlayers/ol.js' }) - doc.script({ 'src' => 'postrunner/trackview.js' }) + doc.script({ 'language' => 'javascript', 'type' => 'text/javascript', + 'src' => 'openlayers/ol.js' }) + doc.script({ 'language' => 'javascript', 'type' => 'text/javascript', + 'src' => 'postrunner/trackview.js' }) } doc.script(java_script) - doc.body_init_script('pr_trackview_init_xy()') } ViewFrame.new('map', 'Map', 600, nil, true) { doc.div({ 'id' => 'map', 'class' => 'trackmap' }) }.to_html(doc) + + doc.body_init_script('pr_trackview_init_xy();') end private diff --git a/lib/postrunner/ViewFrame.rb b/lib/postrunner/ViewFrame.rb index aa416d0..635d297 100644 --- a/lib/postrunner/ViewFrame.rb +++ b/lib/postrunner/ViewFrame.rb @@ -40,7 +40,8 @@ module PostRunner # Add the necessary style sheet snippets to the document head. doc.head { doc.style(style) - doc.script({ 'src' => 'postrunner/postrunner.js' }) + doc.script({ 'language' => 'javascript', 'type' => 'text/javascript', + 'src' => 'postrunner/postrunner.js' }) } } doc.head { |