add setCenter

This commit is contained in:
thinkinggis 2019-02-18 20:26:52 +08:00
parent 6c283ef1b0
commit abe1258adf
3 changed files with 5 additions and 1 deletions

View File

@ -13,7 +13,7 @@ export default class Scene extends Base {
constructor(cfg) {
super(cfg);
this._initMap();
this._initAttribution();
// this._initAttribution(); // 暂时取消,后面作为组件去加载
this.addImage();
this._layers = [];
}

View File

@ -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

View File

@ -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);
}