Echarts's china.js local test is normal, but there is a problem when using the war package.

Local ok, now it seems that there should be a problem after packing the war package.
replace the china.js manually and it will display normally.
I would like to ask what is the cause of this problem, is it the china.js version?

the map of China has become like this.
clipboard.png

Jul.28,2021

can you compare the pre-packaged file with the packaged file?


echarts's maps (whether js or geojson) are compressed in coordinates, turning the coordinate array into a string, and the contents should not be further compressed. If your packaging program compresses the js file, whether it's algorithm replacement or otherwise, it should process the contents of the map coordinate string, resulting in the loss of some polygon coordinates.
it's best if you can load geojson dynamically. When packing, you can skip over the map js file. Or reference to set up a separate map cache.

Menu