terminus-ui icon indicating copy to clipboard operation
terminus-ui copied to clipboard

Chart: Map not visible

Open benjamincharity opened this issue 5 years ago • 3 comments

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.

chart map not working.png

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

benjamincharity avatar Jun 26 '19 16:06 benjamincharity

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

benjamincharity avatar Jul 17 '19 14:07 benjamincharity

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;

benjamincharity avatar Jul 26 '19 14:07 benjamincharity

The above is not a fix. Our code already had these lines directly from the original example.

benjamincharity avatar Jul 30 '19 11:07 benjamincharity