akveo / ngx-admin

Customizable admin dashboard template based on Angular 10+
https://akveo.github.io/ngx-admin/
MIT License
25.19k stars 7.94k forks source link

Bubble map is not working #1576

Closed nnixaa closed 6 years ago

nnixaa commented 6 years ago

Issue type

I'm submitting a ... (check one with "x")

Issue description

Current behavior:

http://akveo.com/ngx-admin/#/pages/maps/bubble Expected behavior:

MikeCullymore commented 6 years ago

Was this fixed? I have downloaded the latest version and it broke my bubble map?

SUlbrichA commented 6 years ago

I managed to rid the error message on the console by adding

"scripts": [
"../node_modules/echarts/dist/echarts.min.js",
"../node_modules/echarts/dist/extension/bmap.min.js",
...
],

following this response

The map still does not show though. I also tried updating to the newest version of ngx-echarts.

SUlbrichA commented 6 years ago

I managed to get it running by looking closer at the ngx-echarts exmples

The problems appears to be that the world map is not registered. I copied the file world.json from node_modules into the assets directory and set the options in a callback:

this.themeSubscription = this.theme.getJsTheme().subscribe(config => {
    // .. set variables  
    this.http.get('assets/world.json').subscribe(geoJson => {
      this.es.registerMap('world', geoJson);
      this.options = {...}
   }
}

If that is the right solution, I'd be happy to submit a pull request

nnixaa commented 6 years ago

Hey @SUlbrichA, many thanks for your help!