You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
805 B
30 lines
805 B
import {
|
|
findElmById,
|
|
invokeVmMethod,
|
|
invokeVmMethodWithoutArgs
|
|
} from '../util'
|
|
|
|
const METHODS = {
|
|
getCenterLocation (ctx, cbs) {
|
|
return invokeVmMethodWithoutArgs(ctx, 'getCenterLocation', cbs)
|
|
},
|
|
moveToLocation (ctx, args) {
|
|
return invokeVmMethod(ctx, 'moveToLocation', args)
|
|
},
|
|
translateMarker (ctx, args) {
|
|
return invokeVmMethod(ctx, 'translateMarker', args, ['animationEnd'])
|
|
},
|
|
includePoints (ctx, args) {
|
|
return invokeVmMethod(ctx, 'includePoints', args)
|
|
},
|
|
getRegion (ctx, cbs) {
|
|
return invokeVmMethodWithoutArgs(ctx, 'getRegion', cbs)
|
|
},
|
|
getScale (ctx, cbs) {
|
|
return invokeVmMethodWithoutArgs(ctx, 'getScale', cbs)
|
|
}
|
|
}
|
|
|
|
export function operateMapPlayer (mapId, pageVm, type, data) {
|
|
return METHODS[type](findElmById(mapId, pageVm), data)
|
|
}
|
|
|