问题
在三维下,使用GeoJSONLayer加载的GeoJSON文件,不能被hitTest选中。
调试
写测试页面调试,发现是GeoJSON数据中带有z值, 且均为0。
解决方案
法一:数据上处理,把z值都过滤掉。
法二:设置GeoJSONLayer的elevationInfo.mode
属性为on-the-ground
。
法三:设置GeoJSONLayer的hasZ
属性为false
。
在线书籍:
https://sourceacademy.org/sicpjs/foreword02
实体书(JavaScript版本)有中文版:
https://book.douban.com/subject/36787585/
课后习题答案(中文):
https://sicp.readthedocs.io/en/latest/index.html
官方github:
多背景,要求上面 400px 是渐变色,下面全部是纯色。
1 | body { |