From abe1258adfae7e21b82a289dbc034b09f68221f5 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Mon, 18 Feb 2019 20:26:52 +0800 Subject: [PATCH] add setCenter --- src/core/scene.js | 2 +- src/geom/shader/polygon_vert.glsl | 1 + src/map/gaodeMap.js | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/scene.js b/src/core/scene.js index 30820daa8a..36aa09b287 100644 --- a/src/core/scene.js +++ b/src/core/scene.js @@ -13,7 +13,7 @@ export default class Scene extends Base { constructor(cfg) { super(cfg); this._initMap(); - this._initAttribution(); + // this._initAttribution(); // 暂时取消,后面作为组件去加载 this.addImage(); this._layers = []; } diff --git a/src/geom/shader/polygon_vert.glsl b/src/geom/shader/polygon_vert.glsl index 9c8508c674..7d35a1d249 100644 --- a/src/geom/shader/polygon_vert.glsl +++ b/src/geom/shader/polygon_vert.glsl @@ -17,6 +17,7 @@ void main() { float scale = pow(2.0,(20.0 - u_zoom)); mat4 matModelViewProjection = projectionMatrix * modelViewMatrix; vec3 newposition = position; + // newposition.x -= 128.0; #ifdef SHAPE newposition =position + a_size * scale* a_shape; #endif diff --git a/src/map/gaodeMap.js b/src/map/gaodeMap.js index 70f9dd8829..bdd98f54f5 100644 --- a/src/map/gaodeMap.js +++ b/src/map/gaodeMap.js @@ -26,6 +26,9 @@ export default class GaodeMap { setZoom(zoom) { return this.map.setZoom(zoom); } + setCenter(lnglat) { + return this.map.setCenter(lnglat); + } setBounds(bounds) { return this.map.setBounds(bounds); }