提交完成以查看 Openlayers3 上的 KMZ 文件?

Commits done to view the KMZ file on Openlayers3?

之前,我使用 Google Earth 作为映射,但现在我正在尝试迁移到 GE OpenLayers3。 我们可以提交以在 Open layers3 上显示 KMZ 文件吗?

欢迎使用 Openlayers。您可以在 OL3 地图上显示 KML,所以首先 unzip your KMZ and see the examples

您需要使用zip.js这样的库解压KMZ,然后使用KML格式读取解压后的数据。

您可以为此找到 a working example(注意:这是一个 kmz 调用其他 kmz ;))

我在这里重复我的 github 存储库中的警告

Demo depends from alerts provided by NOAA National Weather Service at their Storm prediction center, so display can be empty)

但是,如果演示没有显示几何图形,您可以在控制台中查看日志以进行学习(KMZ 未压缩但没有几何图形)