From 1bd12f15605b651073bd64a31e53d0c7428e34df Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Wed, 7 Aug 2019 10:44:29 +0800 Subject: [PATCH] feat(control): add scale, layer.zoom control --- demos/01_circle.html | 12 +- demos/images/layers-2x.png | Bin 0 -> 1259 bytes demos/images/layers.png | Bin 0 -> 696 bytes demos/vector2.html | 25 ++- package.json | 2 + rollup.config.js | 9 + src/component/control/Scale.js | 93 ++++++++ src/component/control/attribution.js | 75 +++++++ src/component/control/base.js | 52 +++++ src/component/control/index.js | 13 ++ src/component/control/layer.js | 273 ++++++++++++++++++++++++ src/component/control/zoom.js | 74 +++++++ src/component/css/l7.css | 243 +++++++++++++++++++++ src/component/images/layers-2x.png | Bin 0 -> 1259 bytes src/component/images/layers.png | Bin 0 -> 696 bytes src/component/popup.js | 127 +++++++++++ src/core/controller/control.js | 40 ++++ src/core/controller/event.js | 36 +++- src/core/engine/picking/picking.js | 8 +- src/core/engine/renderer.js | 2 +- src/core/layer.js | 40 ++-- src/core/scene.js | 33 ++- src/core/style.js | 10 +- src/global.js | 4 +- src/index.js | 7 +- src/layer/tile/vector_tile_mesh.js | 7 + src/map/AMap.js | 6 +- src/source/parser/vector.js | 16 +- src/source/source_cache.js | 69 ++++-- src/source/vector_tile_worker_source.js | 6 +- src/util/bkdr-hash.js | 1 + src/util/dom.js | 80 +++++++ src/util/event.js | 6 + src/util/util.js | 9 + src/worker/actor.js | 7 +- src/worker/workerTile.js | 10 +- 36 files changed, 1325 insertions(+), 70 deletions(-) create mode 100644 demos/images/layers-2x.png create mode 100644 demos/images/layers.png create mode 100644 src/component/control/Scale.js create mode 100644 src/component/control/attribution.js create mode 100644 src/component/control/base.js create mode 100644 src/component/control/index.js create mode 100644 src/component/control/layer.js create mode 100644 src/component/control/zoom.js create mode 100644 src/component/css/l7.css create mode 100644 src/component/images/layers-2x.png create mode 100644 src/component/images/layers.png create mode 100644 src/component/popup.js create mode 100644 src/core/controller/control.js create mode 100644 src/util/dom.js create mode 100644 src/util/event.js create mode 100644 src/util/util.js diff --git a/demos/01_circle.html b/demos/01_circle.html index c427571ff5..a8fa80d791 100644 --- a/demos/01_circle.html +++ b/demos/01_circle.html @@ -13,6 +13,7 @@ +