使用 OpenLayers 可视化多边形数据

Visualization of polygon data using OpenLayers

我有 370 万个小多边形,我想从中创建一个热图。由于它有很多点,因此无法从 JavaScript 数组读取并在地图上绘制。有什么有效的方法吗?

谢谢。

恕我直言,370 万个多边形对于 Javascript 来说看起来有点重。一个好方法是在服务器上生成热图。如果你使用的是Geoserver你可以按照rendering transfomations example from the official documentation. Remember that using Rendering Transformations requires the WPS extension安装(但不需要启用)

配置热图表示后,OpenLayers 客户端仅使用该层。