terminus-ui
terminus-ui copied to clipboard
Chart: Map not visible
1. What is the expected behavior?
The map should be visible
2. What is the current behavior?
The map is not visible, but the locations seem to be placed correctly.
No console errors.
3. What are the steps to reproduce?
Providing a reproduction is the best way to share your issue.
a) Go to the live demos b) Navigate to the Chart demo c) Change the selected chart to the 'map' type. d) Notice no map is visible
NOTE: This is only reproducible when visiting a built application. This does not happen when serving (even with the aot
flag).
Note: This happens even if the map is the chart that is initially loaded
Replication here: http://lab.benjamincharity.com/terminus/demo
4. Which versions of this library, Angular, TypeScript, & browsers are affected?
- UI Library: latest
Others have reported this and a collaborator has replicated the issue. We'll wait a bit to see if more information arises.
https://github.com/amcharts/amcharts4/issues/1424
Another issue specifically around this:
https://github.com/amcharts/amcharts4/issues/1146
The current resolution is to disable the build optimizer. But I do not seeing us turning that off for all of our production applications.
Replication showing that disabling the build optimizer does solve the issue: http://lab.benjamincharity.com/terminus/demo2
Possible fix?
It isn't actually an issue with Angular, you just need to add these lines of code and it will work:
let polygonSeries = map.series.push(new am4maps.MapPolygonSeries());
polygonSeries.useGeodata = true;
The above is not a fix. Our code already had these lines directly from the original example.