Skip to content

Commit

Permalink
closes #212 changed js to load maps locally
Browse files Browse the repository at this point in the history
  • Loading branch information
ToppAce committed Nov 17, 2020
1 parent 4fed81a commit b35bfd0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wbcore/templates/wbcore/projects_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
if (!e.seriesOptions) {
var chart = this,
mapKey = 'countries/' + e.point.drilldown.toLowerCase() +'/'+ e.point.drilldown.toLowerCase() + '-all',
mapfilename = 'highmaps/countries/' + e.point.drilldown.toLowerCase() + '.js',
// Handle error, the timeout is cleared on success
fail = setTimeout(function() {
if (!Highcharts.maps[mapKey]) {
Expand All @@ -58,8 +59,9 @@
// Show the spinner
chart.showLoading('<i class="icon-spinner icon-spin icon-3x"></i>'); // Font Awesome spinner

// Load the drilldown map
$.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function() {
// Load the drilldown map the old way on highcharts
//$.getScript('https://code.highcharts.com/mapdata/' + mapKey + '.js', function() {
$.getScript('{% get_static_prefix %}' + mapfilename , function() {

data = Highcharts.geojson(Highcharts.maps[mapKey]);

Expand Down

0 comments on commit b35bfd0

Please sign in to comment.