Showing
1 changed file
with
8 additions
and
6 deletions
| @@ -193,12 +193,14 @@ Page({ | @@ -193,12 +193,14 @@ Page({ | ||
| 193 | }, | 193 | }, |
| 194 | regionchange(e){ | 194 | regionchange(e){ |
| 195 | console.log('regionchange', e) | 195 | console.log('regionchange', e) |
| 196 | - this.mapCtx.getScale({ | ||
| 197 | - success:(res)=>{ | ||
| 198 | - this.mapData.scale=res.scale; | ||
| 199 | - console.log('regionchange.getScale',res,this.data.map.scale) | ||
| 200 | - }, | ||
| 201 | - }) | 196 | + if(typeof this.mapCtx.getScale!='undefined') { |
| 197 | + this.mapCtx.getScale({ | ||
| 198 | + success: (res) => { | ||
| 199 | + this.mapData.scale = res.scale; | ||
| 200 | + console.log('regionchange.getScale', res, this.data.map.scale) | ||
| 201 | + }, | ||
| 202 | + }) | ||
| 203 | + } | ||
| 202 | 204 | ||
| 203 | this.mapCtx.getCenterLocation({ | 205 | this.mapCtx.getCenterLocation({ |
| 204 | success:(res)=>{ | 206 | success:(res)=>{ |
-
Please register or login to post a comment