diff --git a/src/core/service/api/context/create-map-context.js b/src/core/service/api/context/create-map-context.js index c867b18bea1c63c4a3f7a5e403a54324eca4e8df..bdfb94a48d5343584742c0a4f298bed1db5ed94b 100644 --- a/src/core/service/api/context/create-map-context.js +++ b/src/core/service/api/context/create-map-context.js @@ -13,74 +13,28 @@ class MapContext { this.pageVm = pageVm } - getCenterLocation ({ - success, - fail, - complete - }) { - operateMapPlayer(this.id, this.pageVm, 'getCenterLocation', { - success, - fail, - complete - }) + getCenterLocation (args) { + operateMapPlayer(this.id, this.pageVm, 'getCenterLocation', args) } moveToLocation () { operateMapPlayer(this.id, this.pageVm, 'moveToLocation') } - translateMarker ({ - markerId, - destination, - autoRotate, - rotate, - duration, - animationEnd, - fail - }) { - operateMapPlayer(this.id, this.pageVm, 'translateMarker', { - markerId, - destination, - autoRotate, - rotate, - duration, - animationEnd, - fail - }) + translateMarker (args) { + operateMapPlayer(this.id, this.pageVm, 'translateMarker', args) } - includePoints ({ - points, - padding - }) { - operateMapPlayer(this.id, this.pageVm, 'includePoints', { - points, - padding - }) + includePoints (args) { + operateMapPlayer(this.id, this.pageVm, 'includePoints', args) } - getRegion ({ - success, - fail, - complete - }) { - operateMapPlayer(this.id, this.pageVm, 'getRegion', { - success, - fail, - complete - }) + getRegion (args) { + operateMapPlayer(this.id, this.pageVm, 'getRegion', args) } - getScale ({ - success, - fail, - complete - }) { - operateMapPlayer(this.id, this.pageVm, 'getScale', { - success, - fail, - complete - }) + getScale (args) { + operateMapPlayer(this.id, this.pageVm, 'getScale', args) } } diff --git a/src/platforms/app-plus/service/api/context/operate-map-player.js b/src/platforms/app-plus/service/api/context/operate-map-player.js index 9781d9e566894ff26468c2da78b425290344aa7b..0634c3d5a5fa00064cc79bf6df4ea577c3eb208b 100644 --- a/src/platforms/app-plus/service/api/context/operate-map-player.js +++ b/src/platforms/app-plus/service/api/context/operate-map-player.js @@ -5,8 +5,8 @@ import { operateMapPlayer as operateNVueMapPlayer } from 'uni-platforms/app-plus-nvue/service/api/context/operate-map-player' -export function operateMapPlayer(mapId, pageVm, type, data) { - pageVm.$page.meta.isNVue ? - operateNVueMapPlayer(mapId, pageVm, type, data) : - operateVueMapPlayer(mapId, pageVm, type, data) +export function operateMapPlayer (mapId, pageVm, type, data) { + pageVm.$page.meta.isNVue + ? operateNVueMapPlayer(mapId, pageVm, type, data) + : operateVueMapPlayer(mapId, pageVm, type, data) }