mirror of https://gitee.com/antv-l7/antv-l7
commit
9978929d67
175
CHANGELOG.md
175
CHANGELOG.md
|
@ -3,6 +3,181 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- **pointlayer:** point amimate ([fd66d90](https://github.com/antvis/L7/commit/fd66d90c1dad1925d1b8a3c99e89172a16bb9f60))
|
||||||
|
- rollup plugin ([2e6fc51](https://github.com/antvis/L7/commit/2e6fc512f918c637dec6009d99157a8941b3b7fb))
|
||||||
|
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
|
||||||
|
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
|
||||||
|
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
|
||||||
|
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
|
||||||
|
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
|
||||||
|
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
|
||||||
|
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
|
||||||
|
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
|
||||||
|
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
|
||||||
|
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
|
||||||
|
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
|
||||||
|
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
|
||||||
|
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
|
||||||
|
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- add raster layer ([2b28380](https://github.com/antvis/L7/commit/2b2838015198b8586b0c30fdc154116252a76f29))
|
||||||
|
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
|
||||||
|
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
|
||||||
|
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
|
||||||
|
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- **pointlayer:** point amimate ([fd66d90](https://github.com/antvis/L7/commit/fd66d90c1dad1925d1b8a3c99e89172a16bb9f60))
|
||||||
|
- rollup plugin ([2e6fc51](https://github.com/antvis/L7/commit/2e6fc512f918c637dec6009d99157a8941b3b7fb))
|
||||||
|
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
|
||||||
|
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
|
||||||
|
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
|
||||||
|
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
|
||||||
|
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
|
||||||
|
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
|
||||||
|
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
|
||||||
|
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
|
||||||
|
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
|
||||||
|
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
|
||||||
|
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
|
||||||
|
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
|
||||||
|
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
|
||||||
|
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
|
||||||
|
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
|
||||||
|
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
|
||||||
|
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- rollup plugin ([2e6fc51](https://github.com/antvis/L7/commit/2e6fc512f918c637dec6009d99157a8941b3b7fb))
|
||||||
|
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
|
||||||
|
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
|
||||||
|
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
|
||||||
|
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
|
||||||
|
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
|
||||||
|
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
|
||||||
|
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
|
||||||
|
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
|
||||||
|
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
|
||||||
|
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
|
||||||
|
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
|
||||||
|
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
|
||||||
|
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
|
||||||
|
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
|
||||||
|
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
|
||||||
|
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
|
||||||
|
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- rollup plugin ([2e6fc51](https://github.com/antvis/L7/commit/2e6fc512f918c637dec6009d99157a8941b3b7fb))
|
||||||
|
- **package:** fix package fsevents version ([f1ff9d7](https://github.com/antvis/L7/commit/f1ff9d7afeecadf42409f133a165a5d570046841))
|
||||||
|
- **package:** fix package fsevents version ([1b856b2](https://github.com/antvis/L7/commit/1b856b2279d13d7837fe41eae363db1d706a5357))
|
||||||
|
- animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
|
||||||
|
- **doc:** add Scale example ([5e49ff2](https://github.com/antvis/L7/commit/5e49ff276d75980f12e7af61f712fbd1fa7f33f9))
|
||||||
|
- layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
- layer style storkeColor->stroke ([ac8477b](https://github.com/antvis/L7/commit/ac8477bb44e861df2f5d0a0a2b06bd5795054c3b))
|
||||||
|
- mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
- remove error yarn.lock ([a1a3eff](https://github.com/antvis/L7/commit/a1a3eff2eb3599761105de92987873ec475b0514))
|
||||||
|
- remove error yarn.lock ([64c7c65](https://github.com/antvis/L7/commit/64c7c650453f73b8d96e8510be58f5dada86900e))
|
||||||
|
- render 将 gl 模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
|
||||||
|
- source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
- 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
- **doc:** remove duplicated method ([9e1dfaa](https://github.com/antvis/L7/commit/9e1dfaa9dbdec761f92447874ae7a19bab968cdf))
|
||||||
|
- **gatsby:** gastsby node ([1d96603](https://github.com/antvis/L7/commit/1d966035c4a3bdc34927eb1db16a72ead78ab2dc))
|
||||||
|
- **gatsby:** gastsby node ([1c2d35f](https://github.com/antvis/L7/commit/1c2d35facb2fe60bbde4985bc6a0ddb5a21e3f04))
|
||||||
|
- **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
- 修复 webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
|
||||||
|
- **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
- **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
|
||||||
|
- **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
- **tslint:** igonre lint test data lint ([c1cf91e](https://github.com/antvis/L7/commit/c1cf91e346f8130acb93e2bead29fcf1d0b03233))
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
- polygon 支持 text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
- **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
- **layer:** add blend 效果配置支持 normal,additive ([07da3f7](https://github.com/antvis/L7/commit/07da3f7d1cc6a81b115312be266cff1afb64ecdb))
|
||||||
|
- **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
- **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
- **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
- **layer:** pointLayer add text model ([20ad754](https://github.com/antvis/L7/commit/20ad7540974fdf0a6e902e2ea3700dcd5cf28d1d))
|
||||||
|
- scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
- **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
- **source:** add join transfroms ([6da2528](https://github.com/antvis/L7/commit/6da252879c03980dc61a4a5efd61a00986797d61))
|
||||||
|
- **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
- **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -43,8 +43,9 @@ module.exports = api => {
|
||||||
'@babel/env',
|
'@babel/env',
|
||||||
{
|
{
|
||||||
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins
|
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins
|
||||||
useBuiltIns: 'usage',
|
// useBuiltIns: 'usage',
|
||||||
corejs: '3.0.0',
|
// corejs: '3.0.0',
|
||||||
|
useBuiltIns: isCDNBundle ? 'usage' : false,
|
||||||
// set `modules: false` when building CDN bundle, let rollup do commonjs works
|
// set `modules: false` when building CDN bundle, let rollup do commonjs works
|
||||||
// @see https://github.com/rollup/rollup-plugin-babel#modules
|
// @see https://github.com/rollup/rollup-plugin-babel#modules
|
||||||
modules: (isCDNBundle || isESModule) ? false : 'auto',
|
modules: (isCDNBundle || isESModule) ? false : 'auto',
|
||||||
|
@ -62,8 +63,8 @@ module.exports = api => {
|
||||||
],
|
],
|
||||||
'@babel/preset-typescript'
|
'@babel/preset-typescript'
|
||||||
],
|
],
|
||||||
ignore: [ /[\/\\]core-js/, /@babel[\/\\]runtime/ ],
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
isCDNBundle ? {} : '@babel/plugin-transform-runtime',
|
||||||
'@babel/plugin-proposal-object-rest-spread',
|
'@babel/plugin-proposal-object-rest-spread',
|
||||||
'@babel/plugin-proposal-optional-chaining',
|
'@babel/plugin-proposal-optional-chaining',
|
||||||
'@babel/plugin-proposal-nullish-coalescing-operator',
|
'@babel/plugin-proposal-nullish-coalescing-operator',
|
||||||
|
|
|
@ -11,10 +11,11 @@ Marker<br />`const Marker = new L7.Marker(option)`
|
||||||
|
|
||||||
#### option
|
#### option
|
||||||
|
|
||||||
- color `string` ![map-marker.png](https://cdn.nlark.com/yuque/0/2019/png/104251/1566814628445-4f3152c8-71d1-4908-a651-246c17e507b5.png#align=left&display=inline&height=32&name=map-marker.png&originHeight=32&originWidth=32&size=635&status=done&width=32) 设置默认 marker 的颜色
|
- color `string` ![map-marker.png](https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*BJ6cTpDcuLcAAAAAAAAAAABkARQnAQ) 设置默认 marker 的颜色
|
||||||
- element `Dom|string` 自定义 marker Dom 节点,可以是 dom 实例,也可以是 dom id
|
- element `Dom|string` 自定义 marker Dom 节点,可以是 dom 实例,也可以是 dom id
|
||||||
- anchor `string` 锚点位置 支持 center, top, top-left, top-right, bottom, bottom-left,bottom- right,left, right
|
- anchor `string` 锚点位置 支持 center, top, top-left, top-right, bottom, bottom-left,bottom- right,left, right
|
||||||
- offset `Array` 偏移量 [ 0, 0 ] 分别表示 X, Y 的偏移量
|
- offset `Array` 偏移量 [ 0, 0 ] 分别表示 X, Y 的偏移量
|
||||||
|
- extData 用户自定义属性,支持任意数据类型,存储 marker 属性信息
|
||||||
|
|
||||||
## 方法
|
## 方法
|
||||||
|
|
||||||
|
@ -50,11 +51,19 @@ Marker<br />`const Marker = new L7.Marker(option)`
|
||||||
|
|
||||||
获取 marker 弹出框
|
获取 marker 弹出框
|
||||||
|
|
||||||
|
#### getExtData()
|
||||||
|
|
||||||
|
获取用户自定义数据
|
||||||
|
|
||||||
|
#### setExtData(data)
|
||||||
|
|
||||||
|
设置用户自定义数据
|
||||||
|
|
||||||
## 示例代码
|
## 示例代码
|
||||||
|
|
||||||
#### 默认 Marker
|
#### 默认 Marker
|
||||||
|
|
||||||
\*\*<br />`const marker = new L7.Marker({color:'blue'})`
|
`const marker = new L7.Marker({color:'blue'})`
|
||||||
|
|
||||||
#### 自定义 Marker
|
#### 自定义 Marker
|
||||||
|
|
||||||
|
@ -84,3 +93,26 @@ new L7.Marker({
|
||||||
.setPopup(popup)
|
.setPopup(popup)
|
||||||
.addTo(scene);
|
.addTo(scene);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 事件
|
||||||
|
|
||||||
|
### 鼠标事件
|
||||||
|
|
||||||
|
- mousemove
|
||||||
|
- click
|
||||||
|
- mousedown
|
||||||
|
- mouseup
|
||||||
|
- dblclick
|
||||||
|
- contextmenu
|
||||||
|
- mouseover
|
||||||
|
- mouseout
|
||||||
|
|
||||||
|
事件返回数据
|
||||||
|
|
||||||
|
- target 事件触发源
|
||||||
|
- data extData 用户自定义数据
|
||||||
|
- lnglat marker 经纬度
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
marker.on('click', (e) => {});
|
||||||
|
```
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: CityBuilding
|
||||||
|
order: 6
|
||||||
|
---
|
|
@ -0,0 +1,60 @@
|
||||||
|
---
|
||||||
|
title: 城市建筑
|
||||||
|
order: 6
|
||||||
|
---
|
||||||
|
|
||||||
|
## 使用
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { CityBuildingLayer } from '@antv/l7';
|
||||||
|
```
|
||||||
|
|
||||||
|
### source
|
||||||
|
|
||||||
|
同 [PolygonLayer](./polygon_layer/extrude)
|
||||||
|
|
||||||
|
### size
|
||||||
|
|
||||||
|
同 [PolygonLayer](./polygon_layer/extrude)
|
||||||
|
|
||||||
|
### color
|
||||||
|
|
||||||
|
[PolygonLayer](./polygon_layer/extrude)
|
||||||
|
|
||||||
|
### animate
|
||||||
|
|
||||||
|
开启动画效果
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
layer.animate(true);
|
||||||
|
```
|
||||||
|
|
||||||
|
### style
|
||||||
|
|
||||||
|
- baseColor 楼房颜色,
|
||||||
|
- windowColor: 窗户颜色,
|
||||||
|
- brightColor: 点亮窗户颜色
|
||||||
|
|
||||||
|
其他 style 配置项同
|
||||||
|
|
||||||
|
[layer#style](./layer#style)
|
||||||
|
|
||||||
|
#### 完整代码
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const pointLayer = new CityBuildingLayer();
|
||||||
|
pointLayer
|
||||||
|
.source(await response.json())
|
||||||
|
.size('floor', [0, 500])
|
||||||
|
.color('rgba(242,246,250,1.0)')
|
||||||
|
.animate({
|
||||||
|
enable: true,
|
||||||
|
})
|
||||||
|
.style({
|
||||||
|
opacity: 1.0,
|
||||||
|
baseColor: 'rgb(16,16,16)',
|
||||||
|
windowColor: 'rgb(30,60,89)',
|
||||||
|
brightColor: 'rgb(255,176,38)',
|
||||||
|
});
|
||||||
|
scene.addLayer(pointLayer);
|
||||||
|
```
|
|
@ -50,3 +50,26 @@ const layer = new LineLayer({})
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
### animate
|
||||||
|
|
||||||
|
#### 开启关闭动画
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
layer.animate(true)
|
||||||
|
layer.animate(false)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 设置动画参数
|
||||||
|
|
||||||
|
- duration 动画时间 单位(s)秒
|
||||||
|
- interval 轨迹间隔, 取值区间 0 - 1
|
||||||
|
- trailLength 轨迹长度 取值区间 0 - 1
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
layer.animate({
|
||||||
|
duration: 4,
|
||||||
|
interval: 0.2,
|
||||||
|
trailLength: 0.1
|
||||||
|
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
|
@ -68,3 +68,14 @@ order: 0
|
||||||
lineLayer.size(1); // 线的宽度为 1
|
lineLayer.size(1); // 线的宽度为 1
|
||||||
lineLayer.size([1, 2]); // 宽度为1,高度2
|
lineLayer.size([1, 2]); // 宽度为1,高度2
|
||||||
```
|
```
|
||||||
|
### style
|
||||||
|
|
||||||
|
- lineType dash | solid 线类型实线和虚线
|
||||||
|
- dashArray 虚线配置项 ```[ 5, 5]```
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
layer .style({
|
||||||
|
lineType: 'dash',
|
||||||
|
dashArray: [ 5, 5 ]
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
|
@ -21,4 +21,6 @@ shape 设置成line即可绘制路线图
|
||||||
|
|
||||||
layer.size('',[])
|
layer.size('',[])
|
||||||
```
|
```
|
||||||
|
### animate
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,10 @@ order: 1
|
||||||
|
|
||||||
气泡图通过PointLayer对象实例化,
|
气泡图通过PointLayer对象实例化,
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import { PointLayer } from '@antv/l7';
|
||||||
|
|
||||||
|
```
|
||||||
### shape
|
### shape
|
||||||
|
|
||||||
通常气泡图shape 设置为 **circle**
|
通常气泡图shape 设置为 **circle**
|
||||||
|
@ -29,6 +33,24 @@ new PointLayer()
|
||||||
strokeWidth: 1
|
strokeWidth: 1
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### animate
|
||||||
|
|
||||||
|
气泡图支持水波动画效果
|
||||||
|
|
||||||
|
#### 开启关闭动画
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
layer.animate(true)
|
||||||
|
layer.animate(false)
|
||||||
|
```
|
||||||
|
#### 水波配置项
|
||||||
|
|
||||||
|
- speed 水波速度
|
||||||
|
- rings 水波环数
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## tips
|
## tips
|
||||||
|
|
||||||
目前style的配置项只支持全局设置,不支持数据映射。
|
目前style的配置项只支持全局设置,不支持数据映射。
|
||||||
|
|
|
@ -2,3 +2,32 @@
|
||||||
title: 3D填充图
|
title: 3D填充图
|
||||||
order: 1
|
order: 1
|
||||||
---
|
---
|
||||||
|
## 使用
|
||||||
|
```javascript
|
||||||
|
import { PolygonLayer } from '@antv/l7'
|
||||||
|
const layer = new PolygonLayer();
|
||||||
|
```
|
||||||
|
### shape
|
||||||
|
3D Polygon 将多边形沿Z轴向上拉伸
|
||||||
|
- extrude 常量不支持数据映射
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
layer.shape('extrude');
|
||||||
|
```
|
||||||
|
|
||||||
|
### size
|
||||||
|
size代表拉伸的高度,支持数据映射
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
layer.size(10);// 高度设置成常量
|
||||||
|
layer.size('floor', [0,2000]); // 根据floor字段进行数据映射默认为线
|
||||||
|
layer.size('floor', (floor) => { // 通过回调函数设置size
|
||||||
|
return floor * 2
|
||||||
|
})
|
||||||
|
```
|
||||||
|
### color
|
||||||
|
同 [layer#color](../layer/#color)
|
||||||
|
|
||||||
|
### style
|
||||||
|
同 [layer#style](../layer/#style)
|
||||||
|
|
||||||
|
|
|
@ -2,3 +2,23 @@
|
||||||
title: 填充图
|
title: 填充图
|
||||||
order: 1
|
order: 1
|
||||||
---
|
---
|
||||||
|
## 使用
|
||||||
|
```javascript
|
||||||
|
import { PolygonLayer } from '@antv/l7'
|
||||||
|
const layer = new PolygonLayer();
|
||||||
|
```
|
||||||
|
### shape
|
||||||
|
绘制填充图,shape为```fill``` 常量不支持数据映射
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
layer.shape('fill');
|
||||||
|
```
|
||||||
|
|
||||||
|
### size
|
||||||
|
填充图无size不需要设置size
|
||||||
|
### color
|
||||||
|
同 [layer#color](../layer/#color)
|
||||||
|
|
||||||
|
### style
|
||||||
|
同 [layer#style](../layer/#style)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ order: 2
|
||||||
|
|
||||||
# 简介
|
# 简介
|
||||||
|
|
||||||
L7 专注数据可视化层数据表达,目前 L7 还不支持独立的地图引擎,需要引入第三方引擎,目前支持 高德地图和 MapBox 两种。
|
L7 专注数据可视化层数据表达,目前 L7 还不支持独立的地图引擎,需要引入第三方引擎,目前支持 高德地图和 MapBox 两种。=
|
||||||
L7 在内部解决了不同底图地图直接的差异,同时 L7 层面统一管理地图的操作方法。
|
L7 在内部解决了不同底图地图直接的差异,同时 L7 层面统一管理地图的操作方法。
|
||||||
|
|
||||||
## Map
|
## Map
|
||||||
|
@ -25,6 +25,15 @@ L7 在内部解决了不同底图地图直接的差异,同时 L7 层面统一
|
||||||
|
|
||||||
#### 高德地图实例化
|
#### 高德地图实例化
|
||||||
|
|
||||||
|
高德地图 API 配置参数
|
||||||
|
|
||||||
|
- token
|
||||||
|
注册高德 [API token](https://lbs.amap.com/api/javascript-api/guide/abc/prepare)
|
||||||
|
|
||||||
|
- plugin {array} `['AMap.ElasticMarker','AMap.CircleEditor']`
|
||||||
|
|
||||||
|
加载[高德地图插件](https://lbs.amap.com/api/javascript-api/guide/abc/plugins)
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const L7AMap = new GaodeMap({
|
const L7AMap = new GaodeMap({
|
||||||
pitch: 35.210526315789465,
|
pitch: 35.210526315789465,
|
||||||
|
@ -32,6 +41,7 @@ const L7AMap = new GaodeMap({
|
||||||
center: [104.288144, 31.239692],
|
center: [104.288144, 31.239692],
|
||||||
zoom: 4.4,
|
zoom: 4.4,
|
||||||
token: 'xxxx - token',
|
token: 'xxxx - token',
|
||||||
|
plugin: [], // 可以不设置
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -59,6 +69,8 @@ const scene = new Scene({
|
||||||
|
|
||||||
⚠️ 传入地图实例需要自行引入相关地图的 API
|
⚠️ 传入地图实例需要自行引入相关地图的 API
|
||||||
|
|
||||||
|
⚠️ viewMode 设置为 3D 模式
|
||||||
|
|
||||||
#### 传入高德地图实例
|
#### 传入高德地图实例
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@ -76,6 +88,9 @@ const scene = new Scene({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[示例地址](/zh/examples/tutorial/map#amapInstance)
|
||||||
|
[代码地址](https://github.com/antvis/L7/blob/master/examples/tutorial/map/demo/amapInstance.js)
|
||||||
|
|
||||||
#### 传入 Mapbox 地图实例
|
#### 传入 Mapbox 地图实例
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
|
@ -25,6 +25,15 @@ L7 在内部解决了不同底图地图直接的差异,同时 L7 层面统一
|
||||||
|
|
||||||
#### 高德地图实例化
|
#### 高德地图实例化
|
||||||
|
|
||||||
|
高德地图 API 配置参数
|
||||||
|
|
||||||
|
- token
|
||||||
|
注册高德 [API token](https://lbs.amap.com/api/javascript-api/guide/abc/prepare)
|
||||||
|
|
||||||
|
- plugin {array} `['AMap.ElasticMarker','AMap.CircleEditor']`
|
||||||
|
|
||||||
|
加载[高德地图插件](https://lbs.amap.com/api/javascript-api/guide/abc/plugins)
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const L7AMap = new GaodeMap({
|
const L7AMap = new GaodeMap({
|
||||||
pitch: 35.210526315789465,
|
pitch: 35.210526315789465,
|
||||||
|
@ -32,6 +41,7 @@ const L7AMap = new GaodeMap({
|
||||||
center: [104.288144, 31.239692],
|
center: [104.288144, 31.239692],
|
||||||
zoom: 4.4,
|
zoom: 4.4,
|
||||||
token: 'xxxx - token',
|
token: 'xxxx - token',
|
||||||
|
plugin: [], // 可以不设置
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -59,6 +69,8 @@ const scene = new Scene({
|
||||||
|
|
||||||
⚠️ 传入地图实例需要自行引入相关地图的 API
|
⚠️ 传入地图实例需要自行引入相关地图的 API
|
||||||
|
|
||||||
|
⚠️ viewMode 设置为 3D 模式
|
||||||
|
|
||||||
#### 传入高德地图实例
|
#### 传入高德地图实例
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@ -76,6 +88,9 @@ const scene = new Scene({
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[示例地址](/zh/examples/tutorial/map#amapInstance)
|
||||||
|
[代码地址](https://github.com/antvis/L7/blob/master/examples/tutorial/map/demo/amapInstance.js)
|
||||||
|
|
||||||
#### 传入 Mapbox 地图实例
|
#### 传入 Mapbox 地图实例
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
|
@ -187,7 +187,6 @@ layer.source(
|
||||||
parser:{
|
parser:{
|
||||||
type:'json',
|
type:'json',
|
||||||
coordinates: "coord",
|
coordinates: "coord",
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -18,7 +18,7 @@ order: 0
|
||||||
2.0版本在L7内部动态引入了高德地图JS API,因此不再需要单独引入高德JS API,只需设置 type 为 ```amap``` 并且传入token
|
2.0版本在L7内部动态引入了高德地图JS API,因此不再需要单独引入高德JS API,只需设置 type 为 ```amap``` 并且传入token
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js"></script>
|
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 添加div 标签指定地图容器
|
### 添加div 标签指定地图容器
|
||||||
|
@ -106,7 +106,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json')
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js"></script>
|
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const scene = new L7.Scene({
|
const scene = new L7.Scene({
|
||||||
|
|
|
@ -18,7 +18,7 @@ order: 0
|
||||||
2.0版本在L7内部动态引入了高德地图JS API,因此不再需要单独引入高德JS API,只需设置 type 为 ```amap``` 并且传入token
|
2.0版本在L7内部动态引入了高德地图JS API,因此不再需要单独引入高德JS API,只需设置 type 为 ```amap``` 并且传入token
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js"></script>
|
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 添加div 标签指定地图容器
|
### 添加div 标签指定地图容器
|
||||||
|
@ -106,7 +106,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json')
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js"></script>
|
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const scene = new L7.Scene({
|
const scene = new L7.Scene({
|
||||||
|
|
|
@ -24,7 +24,7 @@ order: 0
|
||||||
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js"></script>
|
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json')
|
||||||
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.css' rel='stylesheet' />
|
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.css' rel='stylesheet' />
|
||||||
|
|
||||||
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.js'></script>
|
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.js'></script>
|
||||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js"></script>
|
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const scene = new L7.Scene({
|
const scene = new L7.Scene({
|
||||||
id: 'map',
|
id: 'map',
|
||||||
|
|
|
@ -24,7 +24,7 @@ order: 0
|
||||||
|
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js"></script>
|
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ fetch('https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json')
|
||||||
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.css' rel='stylesheet' />
|
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.css' rel='stylesheet' />
|
||||||
|
|
||||||
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.js'></script>
|
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.5.0/mapbox-gl.js'></script>
|
||||||
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js"></script>
|
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const scene = new L7.Scene({
|
const scene = new L7.Scene({
|
||||||
id: 'map',
|
id: 'map',
|
||||||
|
|
|
@ -18,7 +18,7 @@ Include the L7 JS JavaScript <head> of your HTML file.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<head>
|
<head>
|
||||||
<script src='https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js'>
|
<script src='https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js'>
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
```
|
```
|
||||||
|
|
|
@ -20,7 +20,7 @@ Include the L7 JS JavaScript <head> of your HTML file.
|
||||||
```html
|
```html
|
||||||
<head>
|
<head>
|
||||||
<! --引入第三方地图JSAPI-->
|
<! --引入第三方地图JSAPI-->
|
||||||
<script src='https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0-beta.26/dist/l7.js'>
|
<script src='https://gw.alipayobjects.com/os/antv/pkg/_antv.l7-2.0.0/dist/l7.js'>
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
```
|
```
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
import { Scene, LineLayer } from '@antv/l7';
|
||||||
|
import { Mapbox } from '@antv/l7-maps';
|
||||||
|
const scene = new Scene({
|
||||||
|
id: 'map',
|
||||||
|
map: new Mapbox({
|
||||||
|
center: [ 110.19382669582967, 40.258134 ],
|
||||||
|
pitch: 0,
|
||||||
|
zoom: 3,
|
||||||
|
style: 'dark'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
'https://gw.alipayobjects.com/os/basement_prod/49a796db-944b-4c35-aa97-1015f0a407f1.json'
|
||||||
|
)
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
data.features = data.features.map(function(fe) {
|
||||||
|
if (fe.properties.saldo < 0) {
|
||||||
|
fe.geometry.coordinates = fe.geometry.coordinates.reverse();
|
||||||
|
}
|
||||||
|
return fe;
|
||||||
|
});
|
||||||
|
const layer = new LineLayer({
|
||||||
|
autoFit: true
|
||||||
|
})
|
||||||
|
.source(data)
|
||||||
|
.shape('line')
|
||||||
|
.size('saldo', [ 1, 2 ])
|
||||||
|
.color('saldo', function(v) {
|
||||||
|
return v < 0 ? 'rgb(60,255,255)' : 'rgb(255,255,60)';
|
||||||
|
})
|
||||||
|
.animate({
|
||||||
|
enable: true,
|
||||||
|
interval: 0.1,
|
||||||
|
duration: 3,
|
||||||
|
trailLength: 1
|
||||||
|
})
|
||||||
|
.style({
|
||||||
|
opacity: 0.8
|
||||||
|
});
|
||||||
|
scene.addLayer(layer);
|
||||||
|
});
|
|
@ -0,0 +1,36 @@
|
||||||
|
import { Scene, CityBuildingLayer } from '@antv/l7';
|
||||||
|
import { Mapbox } from '@antv/l7-maps';
|
||||||
|
|
||||||
|
const scene = new Scene({
|
||||||
|
id: 'map',
|
||||||
|
map: new Mapbox({
|
||||||
|
style: 'dark',
|
||||||
|
center: [ 121.507674, 31.223043 ],
|
||||||
|
pitch: 65.59312320916906,
|
||||||
|
zoom: 15.4,
|
||||||
|
minZoom: 15,
|
||||||
|
maxZoom: 18
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
'https://gw.alipayobjects.com/os/rmsportal/vmvAxgsEwbpoSWbSYvix.json'
|
||||||
|
)
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
const layer = new CityBuildingLayer();
|
||||||
|
layer
|
||||||
|
.source(data)
|
||||||
|
.size('floor', [ 0, 500 ])
|
||||||
|
.color('rgba(242,246,250,1.0)')
|
||||||
|
.animate({
|
||||||
|
enable: true
|
||||||
|
})
|
||||||
|
.style({
|
||||||
|
opacity: 1.0,
|
||||||
|
baseColor: 'rgb(16,16,16)',
|
||||||
|
windowColor: 'rgb(30,60,89)',
|
||||||
|
brightColor: 'rgb(255,176,38)'
|
||||||
|
});
|
||||||
|
scene.addLayer(layer);
|
||||||
|
});
|
|
@ -4,6 +4,16 @@
|
||||||
"en": "Gallery"
|
"en": "Gallery"
|
||||||
},
|
},
|
||||||
"demos": [
|
"demos": [
|
||||||
|
{
|
||||||
|
"filename": "animate.js",
|
||||||
|
"title": "轨迹动画",
|
||||||
|
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*-x3uRY5G_4sAAAAAAAAAAABkARQnAQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "build.js",
|
||||||
|
"title": "点亮城市",
|
||||||
|
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*InPpTbVN-yUAAAAAAAAAAABkARQnAQ"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"filename": "column_dark.js",
|
"filename": "column_dark.js",
|
||||||
"title": "3D柱图深色",
|
"title": "3D柱图深色",
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
"filename": "road_dark.js",
|
"filename": "road_dark.js",
|
||||||
"title": "路径",
|
"title": "路径",
|
||||||
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*DDjQRLEnwpoAAAAAAAAAAABkARQnAQ"
|
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*DDjQRLEnwpoAAAAAAAAAAABkARQnAQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "road_dark_dash.js",
|
||||||
|
"title": "路径虚线",
|
||||||
|
"screenshot":"https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*cGw3T4LPx7YAAAAAAAAAAABkARQnAQ"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
import { Scene, LineLayer } from '@antv/l7';
|
||||||
|
import { Mapbox } from '@antv/l7-maps';
|
||||||
|
|
||||||
|
const scene = new Scene({
|
||||||
|
id: 'map',
|
||||||
|
map: new Mapbox({
|
||||||
|
center: [ 116.3956, 39.9392 ],
|
||||||
|
pitch: 0,
|
||||||
|
zoom: 10,
|
||||||
|
rotation: 0,
|
||||||
|
style: 'dark'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
'https://gw.alipayobjects.com/os/basement_prod/0d2f0113-f48b-4db9-8adc-a3937243d5a3.json'
|
||||||
|
)
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => {
|
||||||
|
const layer = new LineLayer({})
|
||||||
|
.source(data)
|
||||||
|
.size(1.5)
|
||||||
|
.shape('line')
|
||||||
|
.color('标准名称', [ '#5B8FF9', '#5CCEA1', '#F6BD16' ])
|
||||||
|
.style({
|
||||||
|
lineType: 'dash',
|
||||||
|
dashArray: [ 5, 5 ]
|
||||||
|
})
|
||||||
|
;
|
||||||
|
scene.addLayer(layer);
|
||||||
|
});
|
|
@ -0,0 +1,58 @@
|
||||||
|
import { RasterLayer, Scene } from '@antv/l7';
|
||||||
|
import { GaodeMap } from '@antv/l7-maps';
|
||||||
|
import * as GeoTIFF from 'geotiff';
|
||||||
|
const scene = new Scene({
|
||||||
|
id: 'map',
|
||||||
|
map: new GaodeMap({
|
||||||
|
pitch: 0,
|
||||||
|
style: 'dark',
|
||||||
|
center: [ 115.5268, 34.3628 ],
|
||||||
|
zoom: 3
|
||||||
|
})
|
||||||
|
});
|
||||||
|
addLayer();
|
||||||
|
async function getTiffData() {
|
||||||
|
const response = await fetch(
|
||||||
|
'https://gw.alipayobjects.com/os/rmsportal/XKgkjjGaAzRyKupCBiYW.dat'
|
||||||
|
);
|
||||||
|
const arrayBuffer = await response.arrayBuffer();
|
||||||
|
const tiff = await GeoTIFF.fromArrayBuffer(arrayBuffer);
|
||||||
|
const image = await tiff.getImage();
|
||||||
|
const width = image.getWidth();
|
||||||
|
const height = image.getHeight();
|
||||||
|
const values = await image.readRasters();
|
||||||
|
return {
|
||||||
|
data: values[0],
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
min: 0,
|
||||||
|
max: 8000
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async function addLayer() {
|
||||||
|
const tiffdata = await getTiffData();
|
||||||
|
|
||||||
|
const layer = new RasterLayer({});
|
||||||
|
layer
|
||||||
|
.source(tiffdata.data, {
|
||||||
|
parser: {
|
||||||
|
type: 'raster',
|
||||||
|
width: tiffdata.width,
|
||||||
|
height: tiffdata.height,
|
||||||
|
extent: [ 73.482190241, 3.82501784112, 135.106618732, 57.6300459963 ]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.style({
|
||||||
|
clampLow: false,
|
||||||
|
clampHigh: false,
|
||||||
|
opacity: 0.8,
|
||||||
|
domain: [ 0, 8000 ],
|
||||||
|
rampColors: {
|
||||||
|
colors: [ '#FF4818', '#F7B74A', '#FFF598', '#91EABC', '#2EA9A1', '#206C7C' ].reverse(),
|
||||||
|
positions: [ 0, 0.2, 0.4, 0.6, 0.8, 1.0 ]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
scene.addLayer(layer);
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
// https://gw.alipayobjects.com/zos/antvdemo/assets/2019_clip/ndvi_201905.tif
|
||||||
|
import { RasterLayer, Scene } from '@antv/l7';
|
||||||
|
import { GaodeMap } from '@antv/l7-maps';
|
||||||
|
import * as GeoTIFF from 'geotiff';
|
||||||
|
const scene = new Scene({
|
||||||
|
id: 'map',
|
||||||
|
map: new GaodeMap({
|
||||||
|
pitch: 0,
|
||||||
|
style: 'dark',
|
||||||
|
center: [ 115.5268, 34.3628 ],
|
||||||
|
zoom: 3
|
||||||
|
})
|
||||||
|
});
|
||||||
|
addLayer();
|
||||||
|
async function getTiffData() {
|
||||||
|
const response = await fetch(
|
||||||
|
'https://gw.alipayobjects.com/zos/antvdemo/assets/light_clip/lightF141999.tiff'
|
||||||
|
);
|
||||||
|
const arrayBuffer = await response.arrayBuffer();
|
||||||
|
const tiff = await GeoTIFF.fromArrayBuffer(arrayBuffer);
|
||||||
|
const image = await tiff.getImage();
|
||||||
|
const width = image.getWidth();
|
||||||
|
const height = image.getHeight();
|
||||||
|
const values = await image.readRasters();
|
||||||
|
return {
|
||||||
|
data: values[0],
|
||||||
|
width,
|
||||||
|
height
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async function addLayer() {
|
||||||
|
const tiffdata = await getTiffData();
|
||||||
|
|
||||||
|
const layer = new RasterLayer({});
|
||||||
|
layer
|
||||||
|
.source(tiffdata.data, {
|
||||||
|
parser: {
|
||||||
|
type: 'raster',
|
||||||
|
width: tiffdata.width,
|
||||||
|
height: tiffdata.height,
|
||||||
|
extent: [ 73.4821902409999979, 3.8150178409999995, 135.1066187319999869, 57.6300459959999998 ]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.style({
|
||||||
|
opacity: 1.0,
|
||||||
|
clampLow: true,
|
||||||
|
clampHigh: true,
|
||||||
|
domain: [ 0, 90 ],
|
||||||
|
nodataValue: 0,
|
||||||
|
rampColors: {
|
||||||
|
colors: [ 'rgba(166,97,26,0)', '#c3aa00', '#fadb14', '#fef346', '#ffff96' ],
|
||||||
|
positions: [ 0, 0.1, 0.25, 0.5, 1.0 ]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
scene.addLayer(layer);
|
||||||
|
}
|
|
@ -11,12 +11,23 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename": "radar.js",
|
"filename": "radar.js",
|
||||||
"title": "地形",
|
"title": "雷达图",
|
||||||
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*ZiMnSZlmblIAAAAAAAAAAABkARQnAQ"
|
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*ZiMnSZlmblIAAAAAAAAAAABkARQnAQ"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"filename": "dem.js",
|
||||||
|
"title": "地形图",
|
||||||
|
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*oinmTJIlmbMAAAAAAAAAAABkARQnAQ"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"filename": "light.js",
|
"filename": "light.js",
|
||||||
"title": "夜光图"
|
"title": "夜光图",
|
||||||
|
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*nvP2R6ZbSSgAAAAAAAAAAABkARQnAQ"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "ndvi.js",
|
||||||
|
"title": "NDVI",
|
||||||
|
"screenshot": "https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*6BQSTI51T_UAAAAAAAAAAABkARQnAQ"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
// https://gw.alipayobjects.com/zos/antvdemo/assets/2019_clip/ndvi_201905.tif
|
||||||
|
import { RasterLayer, Scene } from '@antv/l7';
|
||||||
|
import { GaodeMap } from '@antv/l7-maps';
|
||||||
|
import * as GeoTIFF from 'geotiff';
|
||||||
|
const scene = new Scene({
|
||||||
|
id: 'map',
|
||||||
|
map: new GaodeMap({
|
||||||
|
pitch: 0,
|
||||||
|
style: 'dark',
|
||||||
|
center: [ 115.5268, 34.3628 ],
|
||||||
|
zoom: 3
|
||||||
|
})
|
||||||
|
});
|
||||||
|
addLayer();
|
||||||
|
async function getTiffData() {
|
||||||
|
const response = await fetch(
|
||||||
|
'https://gw.alipayobjects.com/zos/antvdemo/assets/2019_clip/ndvi_201905.tiff'
|
||||||
|
);
|
||||||
|
const arrayBuffer = await response.arrayBuffer();
|
||||||
|
const tiff = await GeoTIFF.fromArrayBuffer(arrayBuffer);
|
||||||
|
const image = await tiff.getImage();
|
||||||
|
const width = image.getWidth();
|
||||||
|
const height = image.getHeight();
|
||||||
|
const values = await image.readRasters();
|
||||||
|
return {
|
||||||
|
data: values[0],
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
min: 0,
|
||||||
|
max: 8000
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
async function addLayer() {
|
||||||
|
const tiffdata = await getTiffData();
|
||||||
|
|
||||||
|
const layer = new RasterLayer({});
|
||||||
|
layer
|
||||||
|
.source(tiffdata.data, {
|
||||||
|
parser: {
|
||||||
|
type: 'raster',
|
||||||
|
width: tiffdata.width,
|
||||||
|
height: tiffdata.height,
|
||||||
|
extent: [ 73.4766000000000048, 18.1054999999999993, 135.1066187, 57.6300460 ]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.style({
|
||||||
|
opacity: 0.8,
|
||||||
|
clampLow: false,
|
||||||
|
clampHigh: false,
|
||||||
|
domain: [ -3000, 9000 ],
|
||||||
|
rampColors: {
|
||||||
|
colors: [ 'rgb(166,97,26)', 'rgb(223,194,125)', 'rgb(245,245,245)', 'rgb(128,205,193)', 'rgb(1,133,113)' ],
|
||||||
|
positions: [ 0, 0.25, 0.5, 0.75, 1.0 ]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
scene.addLayer(layer);
|
||||||
|
}
|
|
@ -117,6 +117,14 @@ module.exports = {
|
||||||
},
|
},
|
||||||
order: 4
|
order: 4
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
slug: 'api/layer/cityBuilding',
|
||||||
|
title: {
|
||||||
|
zh: '城市建筑',
|
||||||
|
en: 'CityBuilding'
|
||||||
|
},
|
||||||
|
order: 6
|
||||||
|
},
|
||||||
{
|
{
|
||||||
slug: 'api/source',
|
slug: 'api/source',
|
||||||
title: {
|
title: {
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
],
|
],
|
||||||
"allowBranch": [
|
"allowBranch": [
|
||||||
"master",
|
"master",
|
||||||
"next"
|
"docs"
|
||||||
],
|
],
|
||||||
"message": "chore: publish"
|
"message": "chore: publish"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
"@types/enzyme-adapter-react-16": "^1.0.3",
|
"@types/enzyme-adapter-react-16": "^1.0.3",
|
||||||
"@types/gl": "^4.1.0",
|
"@types/gl": "^4.1.0",
|
||||||
"@types/jest": "^24.0.18",
|
"@types/jest": "^24.0.18",
|
||||||
"@types/node": "^12.7.3",
|
"@types/node": "^12.12.22",
|
||||||
"@types/storybook__react": "^4.0.2",
|
"@types/storybook__react": "^4.0.2",
|
||||||
"@types/supercluster": "^5.0.1",
|
"@types/supercluster": "^5.0.1",
|
||||||
"awesome-typescript-loader": "^5.2.1",
|
"awesome-typescript-loader": "^5.2.1",
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
"version:prerelease": "lerna version --conventional-prerelease",
|
"version:prerelease": "lerna version --conventional-prerelease",
|
||||||
"prerelease": "yarn build && yarn bundle",
|
"prerelease": "yarn build && yarn bundle",
|
||||||
"release": "lerna publish from-package --registry https://registry.npmjs.com/ --force-publish",
|
"release": "lerna publish from-package --registry https://registry.npmjs.com/ --force-publish",
|
||||||
"release-cdn": "antv-bin upload -v beta -n @antv/l7",
|
"release-cdn": "antv-bin upload -n @antv/l7",
|
||||||
"storybook": "start-storybook -p 6006",
|
"storybook": "start-storybook -p 6006",
|
||||||
"test": "cross-env BABEL_ENV=test jest",
|
"test": "cross-env BABEL_ENV=test jest",
|
||||||
"coveralls": "jest --coverage && cat ./tests/coverage/lcov.info | coveralls",
|
"coveralls": "jest --coverage && cat ./tests/coverage/lcov.info | coveralls",
|
||||||
|
|
|
@ -3,6 +3,70 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* merge master fix conflict ([652e5d1](https://github.com/antvis/L7/commit/652e5d1cafc350fe98d569f32bf6c592c6a79b89))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* merge master fix conflict ([652e5d1](https://github.com/antvis/L7/commit/652e5d1cafc350fe98d569f32bf6c592c6a79b89))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* merge master fix conflict ([652e5d1](https://github.com/antvis/L7/commit/652e5d1cafc350fe98d569f32bf6c592c6a79b89))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* merge master fix conflict ([652e5d1](https://github.com/antvis/L7/commit/652e5d1cafc350fe98d569f32bf6c592c6a79b89))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-component",
|
"name": "@antv/l7-component",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -24,9 +24,9 @@
|
||||||
"author": "lzxue",
|
"author": "lzxue",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-core": "^2.0.0-beta.26",
|
"@antv/l7-core": "^2.0.0",
|
||||||
"@antv/l7-utils": "^2.0.0-beta.26",
|
"@antv/l7-utils": "^2.0.0",
|
||||||
"core-js": "3",
|
"@babel/runtime": "^7.7.7",
|
||||||
"eventemitter3": "^4.0.0",
|
"eventemitter3": "^4.0.0",
|
||||||
"inversify": "^5.0.1",
|
"inversify": "^5.0.1",
|
||||||
"load-styles": "^2.0.0"
|
"load-styles": "^2.0.0"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
.l7-marker-container {
|
.l7-marker-container {
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.l7-popup-anchor-top,
|
.l7-popup-anchor-top,
|
||||||
.l7-popup-anchor-top-left,
|
.l7-popup-anchor-top-left,
|
||||||
|
@ -363,12 +362,6 @@
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
}
|
}
|
||||||
.l7-cont.l7-marker {
|
|
||||||
position: absolute !important;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 5;
|
|
||||||
}
|
|
||||||
.l7-popup-anchor-top,
|
.l7-popup-anchor-top,
|
||||||
.l7-popup-anchor-top-left,
|
.l7-popup-anchor-top-left,
|
||||||
.l7-popup-anchor-top-right {
|
.l7-popup-anchor-top-right {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { ILngLat, IMapService, IPoint, IPopup, TYPES } from '@antv/l7-core';
|
import { ILngLat, IMapService, IPoint, IPopup, TYPES } from '@antv/l7-core';
|
||||||
import { bindAll, DOM } from '@antv/l7-utils';
|
import { bindAll, DOM } from '@antv/l7-utils';
|
||||||
|
import { EventEmitter } from 'eventemitter3';
|
||||||
import { Container } from 'inversify';
|
import { Container } from 'inversify';
|
||||||
import { anchorTranslate, anchorType, applyAnchorClass } from './utils/anchor';
|
import { anchorTranslate, anchorType, applyAnchorClass } from './utils/anchor';
|
||||||
// marker 支持 dragger 未完成
|
// marker 支持 dragger 未完成
|
||||||
|
@ -10,8 +11,9 @@ export interface IMarkerOption {
|
||||||
color: string;
|
color: string;
|
||||||
offset: number[];
|
offset: number[];
|
||||||
draggable: boolean;
|
draggable: boolean;
|
||||||
|
extData?: any;
|
||||||
}
|
}
|
||||||
export default class Marker {
|
export default class Marker extends EventEmitter {
|
||||||
private markerOption: IMarkerOption;
|
private markerOption: IMarkerOption;
|
||||||
private defaultMarker: boolean;
|
private defaultMarker: boolean;
|
||||||
private popup: IPopup; // TODO: POPup
|
private popup: IPopup; // TODO: POPup
|
||||||
|
@ -19,6 +21,7 @@ export default class Marker {
|
||||||
private lngLat: ILngLat;
|
private lngLat: ILngLat;
|
||||||
private scene: Container;
|
private scene: Container;
|
||||||
constructor(option?: Partial<IMarkerOption>) {
|
constructor(option?: Partial<IMarkerOption>) {
|
||||||
|
super();
|
||||||
this.markerOption = {
|
this.markerOption = {
|
||||||
...this.getDefault(),
|
...this.getDefault(),
|
||||||
...option,
|
...option,
|
||||||
|
@ -38,13 +41,13 @@ export default class Marker {
|
||||||
}
|
}
|
||||||
|
|
||||||
public addTo(scene: Container) {
|
public addTo(scene: Container) {
|
||||||
this.remove();
|
// this.remove();
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
this.mapsService = scene.get<IMapService>(TYPES.IMapService);
|
this.mapsService = scene.get<IMapService>(TYPES.IMapService);
|
||||||
const { element, draggable } = this.markerOption;
|
const { element, draggable } = this.markerOption;
|
||||||
this.mapsService.getMarkerContainer().appendChild(element as HTMLElement);
|
this.mapsService.getMarkerContainer().appendChild(element as HTMLElement);
|
||||||
|
this.registerMarkerEvent(element as HTMLElement);
|
||||||
this.mapsService.on('camerachange', this.update);
|
this.mapsService.on('camerachange', this.update);
|
||||||
// this.setDraggable(draggable);
|
|
||||||
this.update();
|
this.update();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -59,6 +62,8 @@ export default class Marker {
|
||||||
this.mapsService.off('mouseup', this.onUp);
|
this.mapsService.off('mouseup', this.onUp);
|
||||||
this.mapsService.off('touchend', this.onUp);
|
this.mapsService.off('touchend', this.onUp);
|
||||||
}
|
}
|
||||||
|
this.unRegisterMarkerEvent();
|
||||||
|
this.removeAllListeners();
|
||||||
const { element } = this.markerOption;
|
const { element } = this.markerOption;
|
||||||
if (element) {
|
if (element) {
|
||||||
DOM.remove(element);
|
DOM.remove(element);
|
||||||
|
@ -128,6 +133,14 @@ export default class Marker {
|
||||||
return this.markerOption.draggable;
|
return this.markerOption.draggable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getExtData() {
|
||||||
|
return this.markerOption.extData;
|
||||||
|
}
|
||||||
|
|
||||||
|
public setExtData(data: any) {
|
||||||
|
this.markerOption.extData = data;
|
||||||
|
}
|
||||||
|
|
||||||
private update() {
|
private update() {
|
||||||
if (!this.mapsService) {
|
if (!this.mapsService) {
|
||||||
return;
|
return;
|
||||||
|
@ -187,9 +200,38 @@ export default class Marker {
|
||||||
element.addEventListener('click', (e: MouseEvent) => {
|
element.addEventListener('click', (e: MouseEvent) => {
|
||||||
this.onMapClick(e);
|
this.onMapClick(e);
|
||||||
});
|
});
|
||||||
|
element.addEventListener('click', this.eventHander);
|
||||||
applyAnchorClass(element, anchor, 'marker');
|
applyAnchorClass(element, anchor, 'marker');
|
||||||
}
|
}
|
||||||
|
private registerMarkerEvent(element: HTMLElement) {
|
||||||
|
element.addEventListener('mousemove', this.eventHander);
|
||||||
|
element.addEventListener('click', this.eventHander);
|
||||||
|
element.addEventListener('mousedown', this.eventHander);
|
||||||
|
element.addEventListener('mouseup', this.eventHander);
|
||||||
|
element.addEventListener('dblclick', this.eventHander);
|
||||||
|
element.addEventListener('contextmenu', this.eventHander);
|
||||||
|
element.addEventListener('mouseover', this.eventHander);
|
||||||
|
element.addEventListener('mouseout', this.eventHander);
|
||||||
|
}
|
||||||
|
private unRegisterMarkerEvent() {
|
||||||
|
const element = this.getElement();
|
||||||
|
element.removeEventListener('mousemove', this.eventHander);
|
||||||
|
element.removeEventListener('click', this.eventHander);
|
||||||
|
element.removeEventListener('mousedown', this.eventHander);
|
||||||
|
element.removeEventListener('mouseup', this.eventHander);
|
||||||
|
element.removeEventListener('dblclick', this.eventHander);
|
||||||
|
element.removeEventListener('contextmenu', this.eventHander);
|
||||||
|
element.removeEventListener('mouseover', this.eventHander);
|
||||||
|
element.removeEventListener('mouseout', this.eventHander);
|
||||||
|
}
|
||||||
|
|
||||||
|
private eventHander = (e: MouseEvent) => {
|
||||||
|
this.emit(e.type, {
|
||||||
|
target: e,
|
||||||
|
data: this.markerOption.extData,
|
||||||
|
lngLat: this.lngLat,
|
||||||
|
});
|
||||||
|
};
|
||||||
private addDragHandler(e: MouseEvent) {
|
private addDragHandler(e: MouseEvent) {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,135 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* merge master fix conflict ([652e5d1](https://github.com/antvis/L7/commit/652e5d1cafc350fe98d569f32bf6c592c6a79b89))
|
||||||
|
* source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
* **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add raster layer ([2b28380](https://github.com/antvis/L7/commit/2b2838015198b8586b0c30fdc154116252a76f29))
|
||||||
|
* point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
* polygon 支持text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
* **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* merge master fix conflict ([652e5d1](https://github.com/antvis/L7/commit/652e5d1cafc350fe98d569f32bf6c592c6a79b89))
|
||||||
|
* source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
* **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
* polygon 支持text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
* **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* merge master fix conflict ([652e5d1](https://github.com/antvis/L7/commit/652e5d1cafc350fe98d569f32bf6c592c6a79b89))
|
||||||
|
* source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
* **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
* polygon 支持text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
* **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* merge master fix conflict ([652e5d1](https://github.com/antvis/L7/commit/652e5d1cafc350fe98d569f32bf6c592c6a79b89))
|
||||||
|
* source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
* **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
* polygon 支持text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
* **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-core",
|
"name": "@antv/l7-core",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -22,10 +22,10 @@
|
||||||
"author": "xiaoiver",
|
"author": "xiaoiver",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-utils": "^2.0.0-beta.26",
|
"@antv/l7-utils": "^2.0.0",
|
||||||
|
"@babel/runtime": "^7.7.7",
|
||||||
"@mapbox/tiny-sdf": "^1.1.1",
|
"@mapbox/tiny-sdf": "^1.1.1",
|
||||||
"ajv": "^6.10.2",
|
"ajv": "^6.10.2",
|
||||||
"core-js": "3",
|
|
||||||
"element-resize-event": "^3.0.3",
|
"element-resize-event": "^3.0.3",
|
||||||
"eventemitter3": "^4.0.0",
|
"eventemitter3": "^4.0.0",
|
||||||
"gl-matrix": "^3.1.0",
|
"gl-matrix": "^3.1.0",
|
||||||
|
@ -36,7 +36,6 @@
|
||||||
"merge-json-schemas": "^1.0.0",
|
"merge-json-schemas": "^1.0.0",
|
||||||
"probe.gl": "^3.1.1",
|
"probe.gl": "^3.1.1",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"regenerator-runtime": "^0.13.3",
|
|
||||||
"tapable": "^2.0.0-beta.8",
|
"tapable": "^2.0.0-beta.8",
|
||||||
"viewport-mercator-project": "^6.2.1"
|
"viewport-mercator-project": "^6.2.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,7 +46,7 @@ const defaultLayerConfig: Partial<ILayerConfig> = {
|
||||||
'vesica',
|
'vesica',
|
||||||
],
|
],
|
||||||
shape3d: ['cylinder', 'triangleColumn', 'hexagonColumn', 'squareColumn'],
|
shape3d: ['cylinder', 'triangleColumn', 'hexagonColumn', 'squareColumn'],
|
||||||
minZoom: 0,
|
minZoom: -1,
|
||||||
maxZoom: 24,
|
maxZoom: 24,
|
||||||
visible: true,
|
visible: true,
|
||||||
autoFit: false,
|
autoFit: false,
|
||||||
|
|
|
@ -40,12 +40,12 @@ describe('ConfigService', () => {
|
||||||
const { valid, errorText } = configService.validateMapConfig({
|
const { valid, errorText } = configService.validateMapConfig({
|
||||||
zoom: 100,
|
zoom: 100,
|
||||||
minZoom: 100,
|
minZoom: 100,
|
||||||
maxZoom: -1,
|
maxZoom: -2,
|
||||||
});
|
});
|
||||||
expect(valid).toBeFalsy();
|
expect(valid).toBeFalsy();
|
||||||
expect(errorText).toMatch('zoom should be <= 20');
|
expect(errorText).toMatch('zoom should be <= 24');
|
||||||
expect(errorText).toMatch('minZoom should be <= 20');
|
expect(errorText).toMatch('minZoom should be <= 24');
|
||||||
expect(errorText).toMatch('maxZoom should be >= 0');
|
expect(errorText).toMatch('maxZoom should be >= -1');
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
configService.validateMapConfig({
|
configService.validateMapConfig({
|
||||||
|
|
|
@ -6,18 +6,18 @@ export default {
|
||||||
// 地图缩放等级
|
// 地图缩放等级
|
||||||
zoom: {
|
zoom: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
minimum: 0,
|
minimum: -1,
|
||||||
maximum: 20,
|
maximum: 24,
|
||||||
},
|
},
|
||||||
minZoom: {
|
minZoom: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
minimum: 0,
|
minimum: -1,
|
||||||
maximum: 20,
|
maximum: 24,
|
||||||
},
|
},
|
||||||
maxZoom: {
|
maxZoom: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
minimum: 0,
|
minimum: -1,
|
||||||
maximum: 20,
|
maximum: 24,
|
||||||
},
|
},
|
||||||
// 地图中心点
|
// 地图中心点
|
||||||
center: {
|
center: {
|
||||||
|
|
|
@ -5,7 +5,7 @@ export interface IWarnInfo {
|
||||||
}
|
}
|
||||||
const WarnInfo: IWarnInfo = {
|
const WarnInfo: IWarnInfo = {
|
||||||
MapToken:
|
MapToken:
|
||||||
'您正在使用 Demo测试地图token,如果生成环境中使用去对应地图请注册Token',
|
'您正在使用 Demo测试地图token,如果生产环境中使用去对应地图请注册Token',
|
||||||
SDK: '请确认引入了mapbox-gl api且在L7之前引入',
|
SDK: '请确认引入了mapbox-gl api且在L7之前引入',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,8 @@ export interface IAnimateOption {
|
||||||
duration?: number;
|
duration?: number;
|
||||||
trailLength?: number;
|
trailLength?: number;
|
||||||
repeat?: number;
|
repeat?: number;
|
||||||
|
speed?: number;
|
||||||
|
rings?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IEncodeFeature {
|
export interface IEncodeFeature {
|
||||||
|
|
|
@ -71,6 +71,10 @@ export interface IMapConfig<RawMap = {}> {
|
||||||
* 地图实例
|
* 地图实例
|
||||||
*/
|
*/
|
||||||
mapInstance?: RawMap;
|
mapInstance?: RawMap;
|
||||||
|
/**
|
||||||
|
* 高德地图API插件
|
||||||
|
*/
|
||||||
|
plugin?: string[];
|
||||||
/**
|
/**
|
||||||
* 容器 DOM id
|
* 容器 DOM id
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,6 +10,7 @@ export interface ISceneService {
|
||||||
addLayer(layer: ILayer): void;
|
addLayer(layer: ILayer): void;
|
||||||
render(): void;
|
render(): void;
|
||||||
getSceneContainer(): HTMLDivElement;
|
getSceneContainer(): HTMLDivElement;
|
||||||
|
ExportMap2Png(): string;
|
||||||
destroy(): void;
|
destroy(): void;
|
||||||
}
|
}
|
||||||
// scene 事件
|
// scene 事件
|
||||||
|
|
|
@ -218,6 +218,13 @@ export default class Scene extends EventEmitter implements ISceneService {
|
||||||
return this.$container as HTMLDivElement;
|
return this.$container as HTMLDivElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ExportMap2Png(): string {
|
||||||
|
const renderCanvas = this.$container?.getElementsByTagName('canvas')[0];
|
||||||
|
this.render();
|
||||||
|
const layersPng = renderCanvas?.toDataURL() as string;
|
||||||
|
return layersPng;
|
||||||
|
}
|
||||||
|
|
||||||
public destroy() {
|
public destroy() {
|
||||||
this.emit('destroy');
|
this.emit('destroy');
|
||||||
this.inited = false;
|
this.inited = false;
|
||||||
|
|
|
@ -3,6 +3,50 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7",
|
"name": "@antv/l7",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
|
"description": "A Large-scale WebGL-powered Geospatial Data Visualization",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -24,11 +24,12 @@
|
||||||
"author": "antv",
|
"author": "antv",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-component": "^2.0.0-beta.26",
|
"@antv/l7-component": "^2.0.0",
|
||||||
"@antv/l7-core": "^2.0.0-beta.26",
|
"@antv/l7-core": "^2.0.0",
|
||||||
"@antv/l7-layers": "^2.0.0-beta.26",
|
"@antv/l7-layers": "^2.0.0",
|
||||||
"@antv/l7-maps": "^2.0.0-beta.26",
|
"@antv/l7-maps": "^2.0.0",
|
||||||
"@antv/l7-scene": "^2.0.0-beta.26"
|
"@antv/l7-scene": "^2.0.0",
|
||||||
|
"@babel/runtime": "^7.7.7"
|
||||||
},
|
},
|
||||||
"gitHead": "00d23ef70d9ec76eec26833fc50ac18fe584cf26",
|
"gitHead": "00d23ef70d9ec76eec26833fc50ac18fe584cf26",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|
|
@ -3,6 +3,121 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **pointlayer:** point amimate ([fd66d90](https://github.com/antvis/L7/commit/fd66d90c1dad1925d1b8a3c99e89172a16bb9f60))
|
||||||
|
* animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
|
||||||
|
* layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add raster layer ([2b28380](https://github.com/antvis/L7/commit/2b2838015198b8586b0c30fdc154116252a76f29))
|
||||||
|
* point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
* polygon 支持text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
* **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **pointlayer:** point amimate ([fd66d90](https://github.com/antvis/L7/commit/fd66d90c1dad1925d1b8a3c99e89172a16bb9f60))
|
||||||
|
* animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
|
||||||
|
* layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
* polygon 支持text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
* **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
|
||||||
|
* layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
* polygon 支持text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
* **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* animate time ([d2b8041](https://github.com/antvis/L7/commit/d2b8041ebe77753f5687383ce690950b745f748c))
|
||||||
|
* layer style storkeColor->stroke ([27f66a9](https://github.com/antvis/L7/commit/27f66a9918a3568f7f591af161953ac498d2dcba))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **layer:** fix default model config ([2301419](https://github.com/antvis/L7/commit/2301419aadf00a887fc22728b9797e6c1149bead))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* point text add overlap ([98869d8](https://github.com/antvis/L7/commit/98869d876b0e98dd9258c97b9be9f5a69c0a1612))
|
||||||
|
* polygon 支持text ([f5a1546](https://github.com/antvis/L7/commit/f5a15465e230e6f58c92bec5f12b132bc9a9ae91))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* **layer:** add citybuildinglayer & add line add animate ([d657286](https://github.com/antvis/L7/commit/d657286d58c795ba968ae930eb382ca422bdbd08))
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
* **layer:** pointLayer add text model ([84a9193](https://github.com/antvis/L7/commit/84a9193e3a8a311bb52bbedabc8847eabba7dc9a))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-layers",
|
"name": "@antv/l7-layers",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "L7's collection of built-in layers",
|
"description": "L7's collection of built-in layers",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -22,13 +22,13 @@
|
||||||
"author": "xiaoiver",
|
"author": "xiaoiver",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-core": "^2.0.0-beta.26",
|
"@antv/l7-core": "^2.0.0",
|
||||||
"@antv/l7-source": "^2.0.0-beta.26",
|
"@antv/l7-source": "^2.0.0",
|
||||||
"@antv/l7-utils": "^2.0.0-beta.26",
|
"@antv/l7-utils": "^2.0.0",
|
||||||
|
"@babel/runtime": "^7.7.7",
|
||||||
"@mapbox/martini": "^0.1.0",
|
"@mapbox/martini": "^0.1.0",
|
||||||
"@turf/meta": "^6.0.2",
|
"@turf/meta": "^6.0.2",
|
||||||
"@types/d3-color": "^1.2.2",
|
"@types/d3-color": "^1.2.2",
|
||||||
"core-js": "3",
|
|
||||||
"d3-array": "^2.3.1",
|
"d3-array": "^2.3.1",
|
||||||
"d3-color": "^1.4.0",
|
"d3-color": "^1.4.0",
|
||||||
"d3-scale": "^3.1.0",
|
"d3-scale": "^3.1.0",
|
||||||
|
@ -40,7 +40,6 @@
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"merge-json-schemas": "1.0.0",
|
"merge-json-schemas": "1.0.0",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"regenerator-runtime": "^0.13.3",
|
|
||||||
"tapable": "^2.0.0-beta.8"
|
"tapable": "^2.0.0-beta.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -82,7 +82,7 @@ void main() {
|
||||||
if(ux == targetColId){
|
if(ux == targetColId){
|
||||||
n =0.;
|
n =0.;
|
||||||
}
|
}
|
||||||
float timeP = min(0.75, abs ( sin(u_time/6.0) ) );
|
float timeP = min(0.75, abs ( sin(u_time/3.0) ) );
|
||||||
float hot = smoothstep(1.0,0.0,timeP);
|
float hot = smoothstep(1.0,0.0,timeP);
|
||||||
vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), s);
|
vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), s);
|
||||||
//vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), 1.0);
|
//vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), 1.0);
|
||||||
|
|
|
@ -300,13 +300,12 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
|
||||||
// 触发 init 生命周期插件
|
// 触发 init 生命周期插件
|
||||||
this.hooks.init.call();
|
this.hooks.init.call();
|
||||||
this.inited = true;
|
this.inited = true;
|
||||||
|
|
||||||
this.hooks.afterInit.call();
|
|
||||||
// 更新 model 样式
|
// 更新 model 样式
|
||||||
this.updateLayerConfig({
|
this.updateLayerConfig({
|
||||||
...(this.getDefaultConfig() as object),
|
...(this.getDefaultConfig() as object),
|
||||||
...this.rawConfig,
|
...this.rawConfig,
|
||||||
});
|
});
|
||||||
|
this.hooks.afterInit.call();
|
||||||
// 启动动画
|
// 启动动画
|
||||||
const { animateOption } = this.getLayerConfig();
|
const { animateOption } = this.getLayerConfig();
|
||||||
if (animateOption?.enable) {
|
if (animateOption?.enable) {
|
||||||
|
@ -424,7 +423,9 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
|
||||||
this.buildModels();
|
this.buildModels();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public style(options: object & Partial<ILayerConfig>): ILayer {
|
public style(
|
||||||
|
options: Partial<ChildLayerStyleOptions> & Partial<ILayerConfig>,
|
||||||
|
): ILayer {
|
||||||
const { passes, ...rest } = options;
|
const { passes, ...rest } = options;
|
||||||
|
|
||||||
// passes 特殊处理
|
// passes 特殊处理
|
||||||
|
@ -582,7 +583,6 @@ export default class BaseLayer<ChildLayerStyleOptions = {}> extends EventEmitter
|
||||||
}
|
}
|
||||||
public isVisible(): boolean {
|
public isVisible(): boolean {
|
||||||
const zoom = this.mapService.getZoom();
|
const zoom = this.mapService.getZoom();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
visible,
|
visible,
|
||||||
minZoom = -Infinity,
|
minZoom = -Infinity,
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {
|
||||||
ILayer,
|
ILayer,
|
||||||
ILayerConfig,
|
ILayerConfig,
|
||||||
ILayerModel,
|
ILayerModel,
|
||||||
|
ILayerService,
|
||||||
IMapService,
|
IMapService,
|
||||||
IModel,
|
IModel,
|
||||||
IModelUniform,
|
IModelUniform,
|
||||||
|
@ -44,6 +45,7 @@ export default class BaseModel<ChildLayerStyleOptions = {}>
|
||||||
protected styleAttributeService: IStyleAttributeService;
|
protected styleAttributeService: IStyleAttributeService;
|
||||||
protected mapService: IMapService;
|
protected mapService: IMapService;
|
||||||
protected cameraService: ICameraService;
|
protected cameraService: ICameraService;
|
||||||
|
protected layerService: ILayerService;
|
||||||
|
|
||||||
constructor(layer: ILayer) {
|
constructor(layer: ILayer) {
|
||||||
this.layer = layer;
|
this.layer = layer;
|
||||||
|
@ -57,6 +59,10 @@ export default class BaseModel<ChildLayerStyleOptions = {}>
|
||||||
this.cameraService = layer
|
this.cameraService = layer
|
||||||
.getContainer()
|
.getContainer()
|
||||||
.get<ICameraService>(TYPES.ICameraService);
|
.get<ICameraService>(TYPES.ICameraService);
|
||||||
|
this.layerService = layer
|
||||||
|
.getContainer()
|
||||||
|
.get<ILayerService>(TYPES.ILayerService);
|
||||||
|
|
||||||
// 注册 Attribute
|
// 注册 Attribute
|
||||||
this.registerBuiltinAttributes();
|
this.registerBuiltinAttributes();
|
||||||
// 开启动画
|
// 开启动画
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
import BaseLayer from '../core/BaseLayer';
|
||||||
|
import ImageModels, { ImageModelType } from './models/index';
|
||||||
|
interface IImageLayerStyleOptions {
|
||||||
|
opacity: number;
|
||||||
|
}
|
||||||
|
export default class ImageLayer extends BaseLayer<IImageLayerStyleOptions> {
|
||||||
|
public type: string = 'ImageLayer';
|
||||||
|
protected getConfigSchema() {
|
||||||
|
return {
|
||||||
|
properties: {
|
||||||
|
opacity: {
|
||||||
|
type: 'number',
|
||||||
|
minimum: 0,
|
||||||
|
maximum: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
protected getDefaultConfig() {
|
||||||
|
const type = this.getModelType();
|
||||||
|
const defaultConfig = {
|
||||||
|
image: {},
|
||||||
|
};
|
||||||
|
return defaultConfig[type];
|
||||||
|
}
|
||||||
|
protected buildModels() {
|
||||||
|
const modelType = this.getModelType();
|
||||||
|
this.layerModel = new ImageModels[modelType](this);
|
||||||
|
this.models = this.layerModel.buildModels();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected getModelType(): ImageModelType {
|
||||||
|
return 'image';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
import {
|
||||||
|
AttributeType,
|
||||||
|
gl,
|
||||||
|
IEncodeFeature,
|
||||||
|
ILayer,
|
||||||
|
ILayerPlugin,
|
||||||
|
ILogService,
|
||||||
|
IModel,
|
||||||
|
IModelUniform,
|
||||||
|
IRasterParserDataItem,
|
||||||
|
IStyleAttributeService,
|
||||||
|
ITexture2D,
|
||||||
|
lazyInject,
|
||||||
|
TYPES,
|
||||||
|
} from '@antv/l7-core';
|
||||||
|
import { generateColorRamp, IColorRamp } from '@antv/l7-utils';
|
||||||
|
import BaseModel from '../../core/BaseModel';
|
||||||
|
import { RasterImageTriangulation } from '../../core/triangulation';
|
||||||
|
import ImageFrag from '../shaders/image_frag.glsl';
|
||||||
|
import ImageVert from '../shaders/image_vert.glsl';
|
||||||
|
|
||||||
|
interface IImageLayerStyleOptions {
|
||||||
|
opacity: number;
|
||||||
|
}
|
||||||
|
export default class ImageModel extends BaseModel {
|
||||||
|
protected texture: ITexture2D;
|
||||||
|
public getUninforms(): IModelUniform {
|
||||||
|
const { opacity } = this.layer.getLayerConfig() as IImageLayerStyleOptions;
|
||||||
|
return {
|
||||||
|
u_opacity: opacity || 1,
|
||||||
|
u_texture: this.texture,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
public buildModels() {
|
||||||
|
const source = this.layer.getSource();
|
||||||
|
const { createTexture2D } = this.rendererService;
|
||||||
|
this.texture = createTexture2D({
|
||||||
|
height: 0,
|
||||||
|
width: 0,
|
||||||
|
});
|
||||||
|
source.data.images.then((imageData: HTMLImageElement[]) => {
|
||||||
|
this.texture = createTexture2D({
|
||||||
|
data: imageData[0],
|
||||||
|
width: imageData[0].width,
|
||||||
|
height: imageData[0].height,
|
||||||
|
});
|
||||||
|
this.layerService.renderLayers();
|
||||||
|
});
|
||||||
|
return [
|
||||||
|
this.layer.buildLayerModel({
|
||||||
|
moduleName: 'RasterImage',
|
||||||
|
vertexShader: ImageVert,
|
||||||
|
fragmentShader: ImageFrag,
|
||||||
|
triangulation: RasterImageTriangulation,
|
||||||
|
primitive: gl.TRIANGLES,
|
||||||
|
depth: { enable: false },
|
||||||
|
blend: this.getBlend(),
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected getConfigSchema() {
|
||||||
|
return {
|
||||||
|
properties: {
|
||||||
|
opacity: {
|
||||||
|
type: 'number',
|
||||||
|
minimum: 0,
|
||||||
|
maximum: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected registerBuiltinAttributes() {
|
||||||
|
// point layer size;
|
||||||
|
this.styleAttributeService.registerStyleAttribute({
|
||||||
|
name: 'uv',
|
||||||
|
type: AttributeType.Attribute,
|
||||||
|
descriptor: {
|
||||||
|
name: 'a_Uv',
|
||||||
|
buffer: {
|
||||||
|
// give the WebGL driver a hint that this buffer may change
|
||||||
|
usage: gl.DYNAMIC_DRAW,
|
||||||
|
data: [],
|
||||||
|
type: gl.FLOAT,
|
||||||
|
},
|
||||||
|
size: 2,
|
||||||
|
update: (
|
||||||
|
feature: IEncodeFeature,
|
||||||
|
featureIdx: number,
|
||||||
|
vertex: number[],
|
||||||
|
attributeIdx: number,
|
||||||
|
) => {
|
||||||
|
return [vertex[3], vertex[4]];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
import ImageModel from './image';
|
||||||
|
export type ImageModelType = 'image';
|
||||||
|
|
||||||
|
const ImageModels: { [key in ImageModelType]: any } = {
|
||||||
|
image: ImageModel,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ImageModels;
|
|
@ -3,11 +3,11 @@ import CityBuildingLayer from './citybuliding/building';
|
||||||
import BaseLayer from './core/BaseLayer';
|
import BaseLayer from './core/BaseLayer';
|
||||||
import './glsl.d';
|
import './glsl.d';
|
||||||
import HeatmapLayer from './heatmap';
|
import HeatmapLayer from './heatmap';
|
||||||
|
import ImageLayer from './image';
|
||||||
import LineLayer from './line/index';
|
import LineLayer from './line/index';
|
||||||
import PointLayer from './point';
|
import PointLayer from './point';
|
||||||
import PolygonLayer from './polygon';
|
import PolygonLayer from './polygon';
|
||||||
import ImageLayer from './raster/image';
|
import RasterLayer from './raster';
|
||||||
import RasterLayer from './raster/raster';
|
|
||||||
|
|
||||||
import ConfigSchemaValidationPlugin from './plugins/ConfigSchemaValidationPlugin';
|
import ConfigSchemaValidationPlugin from './plugins/ConfigSchemaValidationPlugin';
|
||||||
import DataMappingPlugin from './plugins/DataMappingPlugin';
|
import DataMappingPlugin from './plugins/DataMappingPlugin';
|
||||||
|
|
|
@ -31,8 +31,8 @@ void main() {
|
||||||
float alpha =1.0 - fract( mod(1.0- v_distance_ratio, u_aimate.z)* (1.0/ u_aimate.z) + u_time / u_aimate.y);
|
float alpha =1.0 - fract( mod(1.0- v_distance_ratio, u_aimate.z)* (1.0/ u_aimate.z) + u_time / u_aimate.y);
|
||||||
alpha = (alpha + u_aimate.w -1.0) / u_aimate.w;
|
alpha = (alpha + u_aimate.w -1.0) / u_aimate.w;
|
||||||
alpha = smoothstep(0., 1., alpha);
|
alpha = smoothstep(0., 1., alpha);
|
||||||
float alpha2 = exp(-abs(v_side));
|
// float alpha2 = exp(-abs(v_side));
|
||||||
gl_FragColor.a *= alpha * blur * alpha2;
|
gl_FragColor.a *= alpha * blur;
|
||||||
// gl_FragColor.a = fract(u_time);
|
// gl_FragColor.a = fract(u_time);
|
||||||
}
|
}
|
||||||
// dash line
|
// dash line
|
||||||
|
|
|
@ -62,7 +62,9 @@ export default class FillModel extends BaseModel {
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
protected animateOption2Array(option: IAnimateOption): number[] {
|
||||||
|
return [option.enable ? 0 : 1.0, option.speed || 1, option.rings || 3, 0];
|
||||||
|
}
|
||||||
protected registerBuiltinAttributes() {
|
protected registerBuiltinAttributes() {
|
||||||
this.styleAttributeService.registerStyleAttribute({
|
this.styleAttributeService.registerStyleAttribute({
|
||||||
name: 'extrude',
|
name: 'extrude',
|
||||||
|
|
|
@ -75,7 +75,7 @@ void main() {
|
||||||
|
|
||||||
if(u_aimate.x == Animate) {
|
if(u_aimate.x == Animate) {
|
||||||
float d = length(v_data.xy);
|
float d = length(v_data.xy);
|
||||||
float intensity = clamp(cos(d * PI), 0.0, 1.0) * clamp(cos(2.0 * PI * (d * 2.0 * N_RINGS - FREQ * u_time)), 0.0, 1.0);
|
float intensity = clamp(cos(d * PI), 0.0, 1.0) * clamp(cos(2.0 * PI * (d * 2.0 * u_aimate.z - u_aimate.y * u_time)), 0.0, 1.0);
|
||||||
gl_FragColor = vec4(gl_FragColor.xyz * intensity, intensity);
|
gl_FragColor = vec4(gl_FragColor.xyz * intensity, intensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,106 +1,106 @@
|
||||||
import {
|
// import {
|
||||||
AttributeType,
|
// AttributeType,
|
||||||
gl,
|
// gl,
|
||||||
IEncodeFeature,
|
// IEncodeFeature,
|
||||||
ILayer,
|
// ILayer,
|
||||||
ITexture2D,
|
// ITexture2D,
|
||||||
} from '@antv/l7-core';
|
// } from '@antv/l7-core';
|
||||||
import BaseLayer from '../core/BaseLayer';
|
// import BaseLayer from '../core/BaseLayer';
|
||||||
import { RasterImageTriangulation } from '../core/triangulation';
|
// import { RasterImageTriangulation } from '../core/triangulation';
|
||||||
import rasterImageFrag from './shaders/image_frag.glsl';
|
// import rasterImageFrag from './shaders/image_frag.glsl';
|
||||||
import rasterImageVert from './shaders/image_vert.glsl';
|
// import rasterImageVert from './shaders/image_vert.glsl';
|
||||||
interface IRaterLayerStyleOptions {
|
// interface IRaterLayerStyleOptions {
|
||||||
opacity: number;
|
// opacity: number;
|
||||||
}
|
// }
|
||||||
|
|
||||||
export default class ImageLayer extends BaseLayer<IRaterLayerStyleOptions> {
|
// export default class ImageLayer extends BaseLayer<IRaterLayerStyleOptions> {
|
||||||
public type: string = 'ImageLayer';
|
// public type: string = 'ImageLayer';
|
||||||
protected texture: ITexture2D;
|
// protected texture: ITexture2D;
|
||||||
|
|
||||||
protected getConfigSchema() {
|
// protected getConfigSchema() {
|
||||||
return {
|
// return {
|
||||||
properties: {
|
// properties: {
|
||||||
opacity: {
|
// opacity: {
|
||||||
type: 'number',
|
// type: 'number',
|
||||||
minimum: 0,
|
// minimum: 0,
|
||||||
maximum: 1,
|
// maximum: 1,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
|
|
||||||
protected renderModels() {
|
// protected renderModels() {
|
||||||
const { opacity } = this.getLayerConfig();
|
// const { opacity } = this.getLayerConfig();
|
||||||
if (this.texture) {
|
// if (this.texture) {
|
||||||
this.models.forEach((model) =>
|
// this.models.forEach((model) =>
|
||||||
model.draw({
|
// model.draw({
|
||||||
uniforms: {
|
// uniforms: {
|
||||||
u_opacity: opacity || 1,
|
// u_opacity: opacity || 1,
|
||||||
u_texture: this.texture,
|
// u_texture: this.texture,
|
||||||
},
|
// },
|
||||||
}),
|
// }),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
return this;
|
// return this;
|
||||||
}
|
// }
|
||||||
|
|
||||||
protected buildModels() {
|
// protected buildModels() {
|
||||||
this.registerBuiltinAttributes();
|
// this.registerBuiltinAttributes();
|
||||||
const source = this.getSource();
|
// const source = this.getSource();
|
||||||
const { createTexture2D } = this.rendererService;
|
// const { createTexture2D } = this.rendererService;
|
||||||
source.data.images.then((imageData: HTMLImageElement[]) => {
|
// source.data.images.then((imageData: HTMLImageElement[]) => {
|
||||||
this.texture = createTexture2D({
|
// this.texture = createTexture2D({
|
||||||
data: imageData[0],
|
// data: imageData[0],
|
||||||
width: imageData[0].width,
|
// width: imageData[0].width,
|
||||||
height: imageData[0].height,
|
// height: imageData[0].height,
|
||||||
});
|
// });
|
||||||
this.renderModels();
|
// this.renderModels();
|
||||||
});
|
// });
|
||||||
this.models = [
|
// this.models = [
|
||||||
this.buildLayerModel({
|
// this.buildLayerModel({
|
||||||
moduleName: 'RasterImage',
|
// moduleName: 'RasterImage',
|
||||||
vertexShader: rasterImageVert,
|
// vertexShader: rasterImageVert,
|
||||||
fragmentShader: rasterImageFrag,
|
// fragmentShader: rasterImageFrag,
|
||||||
triangulation: RasterImageTriangulation,
|
// triangulation: RasterImageTriangulation,
|
||||||
primitive: gl.TRIANGLES,
|
// primitive: gl.TRIANGLES,
|
||||||
depth: { enable: false },
|
// depth: { enable: false },
|
||||||
blend: {
|
// blend: {
|
||||||
enable: true,
|
// enable: true,
|
||||||
func: {
|
// func: {
|
||||||
srcRGB: gl.SRC_ALPHA,
|
// srcRGB: gl.SRC_ALPHA,
|
||||||
srcAlpha: 1,
|
// srcAlpha: 1,
|
||||||
dstRGB: gl.ONE_MINUS_SRC_ALPHA,
|
// dstRGB: gl.ONE_MINUS_SRC_ALPHA,
|
||||||
dstAlpha: 1,
|
// dstAlpha: 1,
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
}),
|
// }),
|
||||||
];
|
// ];
|
||||||
}
|
// }
|
||||||
|
|
||||||
private registerBuiltinAttributes() {
|
// private registerBuiltinAttributes() {
|
||||||
// point layer size;
|
// // point layer size;
|
||||||
this.styleAttributeService.registerStyleAttribute({
|
// this.styleAttributeService.registerStyleAttribute({
|
||||||
name: 'uv',
|
// name: 'uv',
|
||||||
type: AttributeType.Attribute,
|
// type: AttributeType.Attribute,
|
||||||
descriptor: {
|
// descriptor: {
|
||||||
name: 'a_Uv',
|
// name: 'a_Uv',
|
||||||
buffer: {
|
// buffer: {
|
||||||
// give the WebGL driver a hint that this buffer may change
|
// // give the WebGL driver a hint that this buffer may change
|
||||||
usage: gl.DYNAMIC_DRAW,
|
// usage: gl.DYNAMIC_DRAW,
|
||||||
data: [],
|
// data: [],
|
||||||
type: gl.FLOAT,
|
// type: gl.FLOAT,
|
||||||
},
|
// },
|
||||||
size: 2,
|
// size: 2,
|
||||||
update: (
|
// update: (
|
||||||
feature: IEncodeFeature,
|
// feature: IEncodeFeature,
|
||||||
featureIdx: number,
|
// featureIdx: number,
|
||||||
vertex: number[],
|
// vertex: number[],
|
||||||
attributeIdx: number,
|
// attributeIdx: number,
|
||||||
) => {
|
// ) => {
|
||||||
return [vertex[3], vertex[4]];
|
// return [vertex[3], vertex[4]];
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
import { IColorRamp } from '@antv/l7-utils';
|
||||||
|
import BaseLayer from '../core/BaseLayer';
|
||||||
|
import RasterModels, { RasterModelType } from './models/index';
|
||||||
|
interface IRasterLayerStyleOptions {
|
||||||
|
opacity: number;
|
||||||
|
domain: [number, number];
|
||||||
|
noDataValue: number;
|
||||||
|
clampLow: boolean;
|
||||||
|
clampHigh: boolean;
|
||||||
|
rampColors: IColorRamp;
|
||||||
|
}
|
||||||
|
export default class RaterLayer extends BaseLayer<IRasterLayerStyleOptions> {
|
||||||
|
public type: string = 'RasterLayer';
|
||||||
|
protected getConfigSchema() {
|
||||||
|
return {
|
||||||
|
properties: {
|
||||||
|
opacity: {
|
||||||
|
type: 'number',
|
||||||
|
minimum: 0,
|
||||||
|
maximum: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
protected getDefaultConfig() {
|
||||||
|
const type = this.getModelType();
|
||||||
|
const defaultConfig = {
|
||||||
|
raster: {},
|
||||||
|
raster3d: {},
|
||||||
|
};
|
||||||
|
return defaultConfig[type];
|
||||||
|
}
|
||||||
|
protected buildModels() {
|
||||||
|
const modelType = this.getModelType();
|
||||||
|
this.layerModel = new RasterModels[modelType](this);
|
||||||
|
this.models = this.layerModel.buildModels();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected getModelType(): RasterModelType {
|
||||||
|
return 'raster';
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
import RasterModel from './raster';
|
||||||
|
export type RasterModelType = 'raster' | 'raster3d';
|
||||||
|
|
||||||
|
const RasterModels: { [key in RasterModelType]: any } = {
|
||||||
|
raster: RasterModel,
|
||||||
|
raster3d: RasterModel,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default RasterModels;
|
|
@ -0,0 +1,113 @@
|
||||||
|
import {
|
||||||
|
AttributeType,
|
||||||
|
gl,
|
||||||
|
IEncodeFeature,
|
||||||
|
ILayer,
|
||||||
|
ILayerPlugin,
|
||||||
|
ILogService,
|
||||||
|
IModel,
|
||||||
|
IModelUniform,
|
||||||
|
IRasterParserDataItem,
|
||||||
|
IStyleAttributeService,
|
||||||
|
ITexture2D,
|
||||||
|
lazyInject,
|
||||||
|
TYPES,
|
||||||
|
} from '@antv/l7-core';
|
||||||
|
import { generateColorRamp, IColorRamp } from '@antv/l7-utils';
|
||||||
|
import BaseModel from '../../core/BaseModel';
|
||||||
|
import { RasterImageTriangulation } from '../../core/triangulation';
|
||||||
|
import rasterFrag from '../shaders/raster_2d_frag.glsl';
|
||||||
|
import rasterVert from '../shaders/raster_2d_vert.glsl';
|
||||||
|
|
||||||
|
interface IRasterLayerStyleOptions {
|
||||||
|
opacity: number;
|
||||||
|
domain: [number, number];
|
||||||
|
noDataValue: number;
|
||||||
|
clampLow: boolean;
|
||||||
|
clampHigh: boolean;
|
||||||
|
rampColors: IColorRamp;
|
||||||
|
}
|
||||||
|
export default class RasterModel extends BaseModel {
|
||||||
|
protected texture: ITexture2D;
|
||||||
|
protected colorTexture: ITexture2D;
|
||||||
|
public getUninforms() {
|
||||||
|
const {
|
||||||
|
opacity = 1,
|
||||||
|
clampLow = true,
|
||||||
|
clampHigh = true,
|
||||||
|
noDataValue = -9999999,
|
||||||
|
domain = [0, 1],
|
||||||
|
} = this.layer.getLayerConfig() as IRasterLayerStyleOptions;
|
||||||
|
|
||||||
|
return {
|
||||||
|
u_opacity: opacity || 1,
|
||||||
|
u_texture: this.texture,
|
||||||
|
u_domain: domain,
|
||||||
|
u_clampLow: clampLow,
|
||||||
|
u_clampHigh: typeof clampHigh !== 'undefined' ? clampHigh : clampLow,
|
||||||
|
u_noDataValue: noDataValue,
|
||||||
|
u_colorTexture: this.colorTexture,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public buildModels() {
|
||||||
|
const source = this.layer.getSource();
|
||||||
|
const { createTexture2D } = this.rendererService;
|
||||||
|
const parserDataItem = source.data.dataArray[0];
|
||||||
|
this.texture = createTexture2D({
|
||||||
|
data: parserDataItem.data,
|
||||||
|
width: parserDataItem.width,
|
||||||
|
height: parserDataItem.height,
|
||||||
|
format: gl.LUMINANCE,
|
||||||
|
type: gl.FLOAT,
|
||||||
|
// aniso: 4,
|
||||||
|
});
|
||||||
|
const {
|
||||||
|
rampColors,
|
||||||
|
} = this.layer.getLayerConfig() as IRasterLayerStyleOptions;
|
||||||
|
const imageData = generateColorRamp(rampColors as IColorRamp);
|
||||||
|
this.colorTexture = createTexture2D({
|
||||||
|
data: imageData.data,
|
||||||
|
width: imageData.width,
|
||||||
|
height: imageData.height,
|
||||||
|
flipY: true,
|
||||||
|
});
|
||||||
|
return [
|
||||||
|
this.layer.buildLayerModel({
|
||||||
|
moduleName: 'RasterImageData',
|
||||||
|
vertexShader: rasterVert,
|
||||||
|
fragmentShader: rasterFrag,
|
||||||
|
triangulation: RasterImageTriangulation,
|
||||||
|
primitive: gl.TRIANGLES,
|
||||||
|
depth: { enable: false },
|
||||||
|
blend: this.getBlend(),
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected registerBuiltinAttributes() {
|
||||||
|
// point layer size;
|
||||||
|
this.styleAttributeService.registerStyleAttribute({
|
||||||
|
name: 'uv',
|
||||||
|
type: AttributeType.Attribute,
|
||||||
|
descriptor: {
|
||||||
|
name: 'a_Uv',
|
||||||
|
buffer: {
|
||||||
|
// give the WebGL driver a hint that this buffer may change
|
||||||
|
usage: gl.DYNAMIC_DRAW,
|
||||||
|
data: [],
|
||||||
|
type: gl.FLOAT,
|
||||||
|
},
|
||||||
|
size: 2,
|
||||||
|
update: (
|
||||||
|
feature: IEncodeFeature,
|
||||||
|
featureIdx: number,
|
||||||
|
vertex: number[],
|
||||||
|
attributeIdx: number,
|
||||||
|
) => {
|
||||||
|
return [vertex[3], vertex[4]];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,12 +5,14 @@ import {
|
||||||
ILayer,
|
ILayer,
|
||||||
ILayerPlugin,
|
ILayerPlugin,
|
||||||
ILogService,
|
ILogService,
|
||||||
|
IModelUniform,
|
||||||
IRasterParserDataItem,
|
IRasterParserDataItem,
|
||||||
IStyleAttributeService,
|
IStyleAttributeService,
|
||||||
ITexture2D,
|
ITexture2D,
|
||||||
lazyInject,
|
lazyInject,
|
||||||
TYPES,
|
TYPES,
|
||||||
} from '@antv/l7-core';
|
} from '@antv/l7-core';
|
||||||
|
|
||||||
import { generateColorRamp, IColorRamp } from '@antv/l7-utils';
|
import { generateColorRamp, IColorRamp } from '@antv/l7-utils';
|
||||||
import BaseLayer from '../core/BaseLayer';
|
import BaseLayer from '../core/BaseLayer';
|
||||||
import { RasterTriangulation } from './buffers/triangulation';
|
import { RasterTriangulation } from './buffers/triangulation';
|
||||||
|
@ -30,6 +32,9 @@ export default class RasterLayer extends BaseLayer<IRasterLayerStyleOptions> {
|
||||||
protected texture: ITexture2D;
|
protected texture: ITexture2D;
|
||||||
protected colorTexture: ITexture2D;
|
protected colorTexture: ITexture2D;
|
||||||
|
|
||||||
|
public getAnimateUniforms(): IModelUniform {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
protected getConfigSchema() {
|
protected getConfigSchema() {
|
||||||
return {
|
return {
|
||||||
properties: {
|
properties: {
|
||||||
|
|
|
@ -4,15 +4,26 @@ uniform sampler2D u_texture;
|
||||||
uniform sampler2D u_colorTexture;
|
uniform sampler2D u_colorTexture;
|
||||||
uniform float u_min;
|
uniform float u_min;
|
||||||
uniform float u_max;
|
uniform float u_max;
|
||||||
|
uniform vec2 u_domain;
|
||||||
|
uniform float u_noDataValue;
|
||||||
|
uniform bool u_clampLow: true;
|
||||||
|
uniform bool u_clampHigh: true;
|
||||||
varying vec2 v_texCoord;
|
varying vec2 v_texCoord;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
float value = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y)).a;
|
float value = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y)).r;
|
||||||
value = clamp(value,u_min,u_max);
|
if (value == u_noDataValue)
|
||||||
float value1 = (value - u_min) / (u_max -u_min);
|
gl_FragColor = vec4(0.0, 0, 0, 0.0);
|
||||||
vec2 ramp_pos = vec2(
|
else if ((!u_clampLow && value < u_domain[0]) || (!u_clampHigh && value > u_domain[1]))
|
||||||
fract(16.0 * (1.0 - value1)),
|
gl_FragColor = vec4(0, 0, 0, 0);
|
||||||
floor(16.0 * (1.0 - value1)) / 16.0);
|
else {
|
||||||
gl_FragColor = texture2D(u_colorTexture,ramp_pos);;
|
float normalisedValue =(value - u_domain[0]) / (u_domain[1] -u_domain[0]);
|
||||||
|
vec2 ramp_pos = vec2(
|
||||||
|
fract(16.0 * (1.0 - normalisedValue)),
|
||||||
|
floor(16.0 * (1.0 - normalisedValue)) / 16.0);
|
||||||
|
gl_FragColor = texture2D(u_colorTexture, ramp_pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,83 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add raster layer ([2b28380](https://github.com/antvis/L7/commit/2b2838015198b8586b0c30fdc154116252a76f29))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* 高德地图底图模式,事件交互注册顺序的问题导致不生效 ([2ad4289](https://github.com/antvis/L7/commit/2ad4289e75519f956a9cb1b44a7231b1151c88fb))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-maps",
|
"name": "@antv/l7-maps",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -23,13 +23,12 @@
|
||||||
"author": "xiaoiver",
|
"author": "xiaoiver",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-core": "^2.0.0-beta.26",
|
"@antv/l7-core": "^2.0.0",
|
||||||
"@antv/l7-utils": "^2.0.0-beta.26",
|
"@antv/l7-utils": "^2.0.0",
|
||||||
"core-js": "3",
|
"@babel/runtime": "^7.7.7",
|
||||||
"gl-matrix": "^3.1.0",
|
"gl-matrix": "^3.1.0",
|
||||||
"inversify": "^5.0.1",
|
"inversify": "^5.0.1",
|
||||||
"mapbox-gl": "^1.2.1",
|
"mapbox-gl": "^1.2.1",
|
||||||
"regenerator-runtime": "^0.13.3",
|
|
||||||
"viewport-mercator-project": "^6.2.1"
|
"viewport-mercator-project": "^6.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -229,6 +229,7 @@ export default class AMapService
|
||||||
maxZoom = 18,
|
maxZoom = 18,
|
||||||
token = AMAP_API_KEY,
|
token = AMAP_API_KEY,
|
||||||
mapInstance,
|
mapInstance,
|
||||||
|
plugin = [],
|
||||||
...rest
|
...rest
|
||||||
} = this.config;
|
} = this.config;
|
||||||
// 高德地图创建独立的container;
|
// 高德地图创建独立的container;
|
||||||
|
@ -273,7 +274,9 @@ export default class AMapService
|
||||||
if (token === AMAP_API_KEY) {
|
if (token === AMAP_API_KEY) {
|
||||||
this.logger.warn(this.configService.getSceneWarninfo('MapToken'));
|
this.logger.warn(this.configService.getSceneWarninfo('MapToken'));
|
||||||
}
|
}
|
||||||
const url: string = `https://webapi.amap.com/maps?v=${AMAP_VERSION}&key=${token}&plugin=Map3D&callback=initAMap`;
|
const url: string = `https://webapi.amap.com/maps?v=${AMAP_VERSION}&key=${token}&plugin=Map3D${plugin.join(
|
||||||
|
',',
|
||||||
|
)}&callback=initAMap`;
|
||||||
const $jsapi = document.createElement('script');
|
const $jsapi = document.createElement('script');
|
||||||
$jsapi.id = AMAP_SCRIPT_ID;
|
$jsapi.id = AMAP_SCRIPT_ID;
|
||||||
$jsapi.charset = 'utf-8';
|
$jsapi.charset = 'utf-8';
|
||||||
|
|
|
@ -3,6 +3,79 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* render 将gl模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
|
||||||
|
* 修复webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add raster layer ([2b28380](https://github.com/antvis/L7/commit/2b2838015198b8586b0c30fdc154116252a76f29))
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* render 将gl模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
|
||||||
|
* 修复webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* render 将gl模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
|
||||||
|
* 修复webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* render 将gl模块移动到开发分支, update tslint rule ([fe8b480](https://github.com/antvis/L7/commit/fe8b480895a3d6d919e63f93306a203f5582e5d6))
|
||||||
|
* 修复webgl 扩展兼容问题 ([cd6f5fc](https://github.com/antvis/L7/commit/cd6f5fc7d202f7db1424f3c8b263a99d39d7c778))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add blend 效果配置支持 normal,additive ([e0ab4cd](https://github.com/antvis/L7/commit/e0ab4cd386f53ba4e93aaebfb1fa05b6e438710e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-renderer",
|
"name": "@antv/l7-renderer",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -25,12 +25,11 @@
|
||||||
"gl": "^4.4.0"
|
"gl": "^4.4.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-core": "^2.0.0-beta.26",
|
"@antv/l7-core": "^2.0.0",
|
||||||
"core-js": "3",
|
"@babel/runtime": "^7.7.7",
|
||||||
"inversify": "^5.0.1",
|
"inversify": "^5.0.1",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"regenerator-runtime": "^0.13.3",
|
|
||||||
"regl": "^1.3.11"
|
"regl": "^1.3.11"
|
||||||
},
|
},
|
||||||
"gitHead": "00d23ef70d9ec76eec26833fc50ac18fe584cf26",
|
"gitHead": "00d23ef70d9ec76eec26833fc50ac18fe584cf26",
|
||||||
|
|
|
@ -52,7 +52,6 @@ export default class ReglRendererService implements IRendererService {
|
||||||
// TODO: use extensions
|
// TODO: use extensions
|
||||||
extensions: [
|
extensions: [
|
||||||
'OES_element_index_uint',
|
'OES_element_index_uint',
|
||||||
// 'EXT_shader_texture_lod', // IBL 兼容性问题
|
|
||||||
'EXT_blend_minmax',
|
'EXT_blend_minmax',
|
||||||
'OES_standard_derivatives', // wireframe
|
'OES_standard_derivatives', // wireframe
|
||||||
// 'OES_texture_float', // shadow map 兼容性问题
|
// 'OES_texture_float', // shadow map 兼容性问题
|
||||||
|
@ -60,7 +59,7 @@ export default class ReglRendererService implements IRendererService {
|
||||||
'angle_instanced_arrays',
|
'angle_instanced_arrays',
|
||||||
'EXT_texture_filter_anisotropic', // VSM shadow map
|
'EXT_texture_filter_anisotropic', // VSM shadow map
|
||||||
],
|
],
|
||||||
// optionalExtensions: ['oes_texture_float_linear'],
|
optionalExtensions: ['oes_texture_float_linear', 'OES_texture_float'],
|
||||||
profile: true,
|
profile: true,
|
||||||
onDone: (err: Error | null, r?: regl.Regl | undefined): void => {
|
onDone: (err: Error | null, r?: regl.Regl | undefined): void => {
|
||||||
if (err || !r) {
|
if (err || !r) {
|
||||||
|
|
|
@ -3,6 +3,50 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* scene 实例化支持传入地图实例 & 更新文档 ([cb1d4b6](https://github.com/antvis/L7/commit/cb1d4b6c7d0e65a5e15138ae01adb56cd1b6ee43))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-scene",
|
"name": "@antv/l7-scene",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -22,12 +22,12 @@
|
||||||
"author": "xiaoiver",
|
"author": "xiaoiver",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-component": "^2.0.0-beta.26",
|
"@antv/l7-component": "^2.0.0",
|
||||||
"@antv/l7-core": "^2.0.0-beta.26",
|
"@antv/l7-core": "^2.0.0",
|
||||||
"@antv/l7-maps": "^2.0.0-beta.26",
|
"@antv/l7-maps": "^2.0.0",
|
||||||
"@antv/l7-renderer": "^2.0.0-beta.26",
|
"@antv/l7-renderer": "^2.0.0",
|
||||||
"@antv/l7-utils": "^2.0.0-beta.26",
|
"@antv/l7-utils": "^2.0.0",
|
||||||
"core-js": "3",
|
"@babel/runtime": "^7.7.7",
|
||||||
"inversify": "^5.0.1",
|
"inversify": "^5.0.1",
|
||||||
"mapbox-gl": "^1.2.1",
|
"mapbox-gl": "^1.2.1",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
|
|
|
@ -99,6 +99,9 @@ class Scene
|
||||||
public getMapService(): IMapService<unknown> {
|
public getMapService(): IMapService<unknown> {
|
||||||
return this.mapService;
|
return this.mapService;
|
||||||
}
|
}
|
||||||
|
public ExportMap2Png(): string {
|
||||||
|
return this.sceneService.ExportMap2Png();
|
||||||
|
}
|
||||||
|
|
||||||
public get map() {
|
public get map() {
|
||||||
return this.mapService.map;
|
return this.mapService.map;
|
||||||
|
|
|
@ -3,6 +3,94 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
* **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
* **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
* **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
* **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
* **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
* **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* mapbox token 校验问题 ([6c1f934](https://github.com/antvis/L7/commit/6c1f93425676c5baad90e464b3915068ba4157e2))
|
||||||
|
* source 聚合方法接口定义问题 ([27bdd02](https://github.com/antvis/L7/commit/27bdd02e76f3374b3e1568553ca20455ee7c1511))
|
||||||
|
* **lint:** igonre lint test data lint ([1782893](https://github.com/antvis/L7/commit/178289348a26586b1ccbc8f75baa3b7312693a8c))
|
||||||
|
* **parser:** fix multipolygom parser ([2ad8c9f](https://github.com/antvis/L7/commit/2ad8c9f0a858f1eb1015a20b267d66c4478caf2d))
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **source:** add join transfroms ([ec3cae2](https://github.com/antvis/L7/commit/ec3cae2f5fd0491a895cf4ba3953da94b5af2c84))
|
||||||
|
* **source:** wip cluster ([3203959](https://github.com/antvis/L7/commit/320395942499b4123de2155d20ff6cecec6100b9))
|
||||||
|
* **source render:** source transfrom, layer event ([27a09a7](https://github.com/antvis/L7/commit/27a09a7a7a79b50598af22a0de18b062d60afcac))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-source",
|
"name": "@antv/l7-source",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -24,13 +24,13 @@
|
||||||
"author": "lzxue",
|
"author": "lzxue",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/l7-core": "^2.0.0-beta.26",
|
"@antv/l7-core": "^2.0.0",
|
||||||
"@antv/l7-utils": "^2.0.0-beta.26",
|
"@antv/l7-utils": "^2.0.0",
|
||||||
|
"@babel/runtime": "^7.7.7",
|
||||||
"@mapbox/geojson-rewind": "^0.4.0",
|
"@mapbox/geojson-rewind": "^0.4.0",
|
||||||
"@turf/helpers": "^6.1.4",
|
"@turf/helpers": "^6.1.4",
|
||||||
"@turf/invariant": "^6.1.2",
|
"@turf/invariant": "^6.1.2",
|
||||||
"@turf/meta": "^6.0.2",
|
"@turf/meta": "^6.0.2",
|
||||||
"core-js": "3",
|
|
||||||
"d3-dsv": "^1.1.1",
|
"d3-dsv": "^1.1.1",
|
||||||
"d3-hexbin": "^0.2.2",
|
"d3-hexbin": "^0.2.2",
|
||||||
"eventemitter3": "^4.0.0",
|
"eventemitter3": "^4.0.0",
|
||||||
|
|
|
@ -3,6 +3,70 @@
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [2.0.0-beta.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.28) (2020-01-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-beta.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.27) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.28](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.28) (2020-01-01)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# [2.0.0-alpha.27](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-alpha.27) (2019-12-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **scene:** contianer resize ([1c3be82](https://github.com/antvis/L7/commit/1c3be82711999b70a802a7f0c24ff9ccf76e2d94))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **layer:** add setSelect setActive 方法 & refactor color util ([5c27d66](https://github.com/antvis/L7/commit/5c27d66a6401192f5e0406a2f4c3e0983dc2867c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
# [2.0.0-beta.26](https://github.com/antvis/L7/compare/v2.0.0-beta.16...v2.0.0-beta.26) (2019-12-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7-utils",
|
"name": "@antv/l7-utils",
|
||||||
"version": "2.0.0-beta.26",
|
"version": "2.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
@ -22,8 +22,8 @@
|
||||||
"author": "lzxue",
|
"author": "lzxue",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@turf/helpers": "^6.1.4",
|
"@babel/runtime": "^7.7.7",
|
||||||
"core-js": "3"
|
"@turf/helpers": "^6.1.4"
|
||||||
},
|
},
|
||||||
"gitHead": "00d23ef70d9ec76eec26833fc50ac18fe584cf26",
|
"gitHead": "00d23ef70d9ec76eec26833fc50ac18fe584cf26",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|
|
@ -142,7 +142,7 @@ const IndexPage = () => {
|
||||||
githubStarLink="https://github.com/antvis/L7/stargazers"
|
githubStarLink="https://github.com/antvis/L7/stargazers"
|
||||||
/>
|
/>
|
||||||
<Features features={features} style={{ width: '100%' }} />
|
<Features features={features} style={{ width: '100%' }} />
|
||||||
<Cases style={{ width: '102%' }} cases={cases} />
|
<Cases cases={cases} />
|
||||||
<Companies title={t('感谢信赖')} companies={companies} />
|
<Companies title={t('感谢信赖')} companies={companies} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default class MarkerComponent extends React.Component {
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
const scene = new Scene({
|
const scene = new Scene({
|
||||||
id: 'map',
|
id: 'map',
|
||||||
map: new Mapbox({
|
map: new GaodeMap({
|
||||||
style: 'dark',
|
style: 'dark',
|
||||||
center: [110.19382669582967, 30.258134],
|
center: [110.19382669582967, 30.258134],
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
|
@ -30,6 +30,7 @@ export default class MarkerComponent extends React.Component {
|
||||||
layer
|
layer
|
||||||
.source(data)
|
.source(data)
|
||||||
.size('name', [0, 10000, 50000, 30000, 100000])
|
.size('name', [0, 10000, 50000, 30000, 100000])
|
||||||
|
.active(true)
|
||||||
.color('name', [
|
.color('name', [
|
||||||
'#2E8AE6',
|
'#2E8AE6',
|
||||||
'#69D1AB',
|
'#69D1AB',
|
||||||
|
@ -40,15 +41,34 @@ export default class MarkerComponent extends React.Component {
|
||||||
])
|
])
|
||||||
.shape('fill')
|
.shape('fill')
|
||||||
.style({
|
.style({
|
||||||
opacity: 0.3,
|
opacity: 0.8,
|
||||||
});
|
});
|
||||||
scene.addLayer(layer);
|
scene.addLayer(layer);
|
||||||
const marker = new Marker().setLnglat({
|
const marker = new Marker().setLnglat({
|
||||||
lng: 120.19382669582967,
|
lng: 120.19382669582967,
|
||||||
lat: 30.258134,
|
lat: 30.258134,
|
||||||
});
|
});
|
||||||
|
marker.on('click', (e) => {
|
||||||
|
console.log(e);
|
||||||
|
});
|
||||||
|
|
||||||
scene.addMarker(marker);
|
scene.addMarker(marker);
|
||||||
|
scene.on('loaded', () => {
|
||||||
|
// @ts-ignore
|
||||||
|
const marker1 = new AMap.Marker({
|
||||||
|
map: scene.map,
|
||||||
|
position: [113.800646, 34.796227],
|
||||||
|
shadow: '#000',
|
||||||
|
label: {
|
||||||
|
content: '站点',
|
||||||
|
direction: 'top',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
marker1.on('click', () => {
|
||||||
|
alert(1111);
|
||||||
|
console.log('选中的点', 1111);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default class ImageLayerDemo extends React.Component {
|
||||||
map: new Mapbox({
|
map: new Mapbox({
|
||||||
center: [121.268, 30.3628],
|
center: [121.268, 30.3628],
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
style: 'mapbox://styles/mapbox/streets-v9',
|
style: 'dark',
|
||||||
zoom: 10,
|
zoom: 10,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
@ -30,7 +30,6 @@ export default class ImageLayerDemo extends React.Component {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
scene.addLayer(layer);
|
scene.addLayer(layer);
|
||||||
scene.render();
|
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
import { RasterLayer, Scene } from '@antv/l7';
|
import { RasterLayer, Scene } from '@antv/l7';
|
||||||
import { Mapbox } from '@antv/l7-maps';
|
import { Mapbox } from '@antv/l7-maps';
|
||||||
|
import * as dat from 'dat.gui';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import * as GeoTIFF from 'geotiff/dist/geotiff.bundle.js';
|
import * as GeoTIFF from 'geotiff/dist/geotiff.bundle.js';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
export default class ImageLayerDemo extends React.Component {
|
export default class ImageLayerDemo extends React.Component {
|
||||||
private scene: Scene;
|
private scene: Scene;
|
||||||
|
private gui: dat.GUI;
|
||||||
|
|
||||||
public componentWillUnmount() {
|
public componentWillUnmount() {
|
||||||
this.scene.destroy();
|
this.scene.destroy();
|
||||||
|
if (this.gui) {
|
||||||
|
this.gui.destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async componentDidMount() {
|
public async componentDidMount() {
|
||||||
|
@ -17,7 +22,7 @@ export default class ImageLayerDemo extends React.Component {
|
||||||
map: new Mapbox({
|
map: new Mapbox({
|
||||||
center: [121.268, 30.3628],
|
center: [121.268, 30.3628],
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
style: 'mapbox://styles/mapbox/streets-v9',
|
style: 'dark',
|
||||||
zoom: 2,
|
zoom: 2,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
@ -36,6 +41,8 @@ export default class ImageLayerDemo extends React.Component {
|
||||||
})
|
})
|
||||||
.style({
|
.style({
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
|
domain: [100, 4000],
|
||||||
|
clampLow: true,
|
||||||
rampColors: {
|
rampColors: {
|
||||||
colors: [
|
colors: [
|
||||||
'#002466',
|
'#002466',
|
||||||
|
@ -53,8 +60,45 @@ export default class ImageLayerDemo extends React.Component {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
scene.addLayer(layer);
|
scene.addLayer(layer);
|
||||||
scene.render();
|
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
|
/*** 运行时修改样式属性 ***/
|
||||||
|
const gui = new dat.GUI();
|
||||||
|
this.gui = gui;
|
||||||
|
const styleOptions = {
|
||||||
|
clampLow: true,
|
||||||
|
clampHigh: true,
|
||||||
|
noDataValue: -9999999,
|
||||||
|
min: 100,
|
||||||
|
max: 4000,
|
||||||
|
};
|
||||||
|
const rasterFolder = gui.addFolder('栅格可视化');
|
||||||
|
rasterFolder.add(styleOptions, 'clampLow').onChange((clampLow: boolean) => {
|
||||||
|
layer.style({
|
||||||
|
clampLow,
|
||||||
|
});
|
||||||
|
scene.render();
|
||||||
|
});
|
||||||
|
rasterFolder
|
||||||
|
.add(styleOptions, 'clampHigh')
|
||||||
|
.onChange((clampHigh: boolean) => {
|
||||||
|
layer.style({
|
||||||
|
clampHigh,
|
||||||
|
});
|
||||||
|
scene.render();
|
||||||
|
});
|
||||||
|
rasterFolder.add(styleOptions, 'min', 0, 9000).onChange((min: number) => {
|
||||||
|
layer.style({
|
||||||
|
domain: [min, styleOptions.max],
|
||||||
|
});
|
||||||
|
scene.render();
|
||||||
|
});
|
||||||
|
rasterFolder.add(styleOptions, 'max', 0, 9000).onChange((max: number) => {
|
||||||
|
layer.style({
|
||||||
|
domain: [styleOptions.min, max],
|
||||||
|
});
|
||||||
|
scene.render();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public render() {
|
public render() {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": ["es6", "dom"],
|
"lib": ["es6", "dom"],
|
||||||
"types": ["reflect-metadata", "jest"],
|
"types": ["reflect-metadata", "jest" ],
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
|
Loading…
Reference in New Issue