| | |
| | | import { map, isDragging } from '@/utils/map/index_old'; |
| | | import marks from '@/utils/map/marks'; |
| | | import Layer from '@/utils/map/3dLayer'; |
| | | |
| | | /** |
| | | * 坐标集合的最西南角和最东北角 |
| | |
| | | }; |
| | | |
| | | export default { |
| | | setCenter(lnglat) { |
| | | if (isDragging) { |
| | | setCenter(lnglat, ignore = false) { |
| | | if (!ignore && isDragging) { |
| | | return; |
| | | } |
| | | var now = new Date(); |
| | | if ( |
| | | this.lasttime == undefined || |
| | | now.getTime() - this.lasttime.getTime() >= 1000 |
| | | now.getTime() - this.lasttime.getTime() >= 200 |
| | | ) { |
| | | map.setCenter(lnglat); |
| | | this.lasttime = now; |
| | |
| | | clearMap() { |
| | | marks.clearMassMarks(); |
| | | map.clearMap(); |
| | | Layer.clear(); |
| | | }, |
| | | setFitView(views) { |
| | | if (views) { |