diff --git a/src/core/service/api/context/create-map-context.js b/src/core/service/api/context/create-map-context.js index 58c3ddd72bf9993ce1eb538fad87250068f221a3..7708f6e2e12397ee269e3b4737ed14a960ba67a8 100644 --- a/src/core/service/api/context/create-map-context.js +++ b/src/core/service/api/context/create-map-context.js @@ -18,7 +18,22 @@ UniServiceJSBridge.subscribe('onMapMethodCallback', ({ callback.invoke(callbackId, data) }) -const methods = ['getCenterLocation', 'moveToLocation', 'getScale', 'getRegion', 'includePoints', 'translateMarker'] +const methods = ['getCenterLocation', + 'moveToLocation', + 'getScale', + 'getRegion', + 'includePoints', + 'translateMarker', + 'addCustomLayer', + 'removeCustomLayer', + 'addGroundOverlay', + 'removeGroundOverlay', + 'updateGroundOverlay', + 'initMarkerCluster', + 'addMarkers', + 'removeMarkers', + 'moveAlong', + 'openMapApp'] export class MapContext { constructor (id, pageVm) { diff --git a/src/platforms/app-plus-nvue/service/api/context/operate-map-player.js b/src/platforms/app-plus-nvue/service/api/context/operate-map-player.js index d458aa88da5db551a7bc77d631bc2dc5447e6d4e..01cd7b1dd9e7510b3e3d042b2f6154e7cf8b11f4 100644 --- a/src/platforms/app-plus-nvue/service/api/context/operate-map-player.js +++ b/src/platforms/app-plus-nvue/service/api/context/operate-map-player.js @@ -22,6 +22,36 @@ const METHODS = { }, getScale (ctx, cbs) { return invokeVmMethodWithoutArgs(ctx, 'getScale', cbs) + }, + addCustomLayer (ctx, args) { + return invokeVmMethod(ctx, 'addCustomLayer', args) + }, + removeCustomLayer (ctx, args) { + return invokeVmMethod(ctx, 'removeCustomLayer', args) + }, + addGroundOverlay (ctx, args) { + return invokeVmMethod(ctx, 'addGroundOverlay', args) + }, + removeGroundOverlay (ctx, args) { + return invokeVmMethod(ctx, 'removeGroundOverlay', args) + }, + updateGroundOverlay (ctx, args) { + return invokeVmMethod(ctx, 'updateGroundOverlay', args) + }, + initMarkerCluster (ctx, args) { + return invokeVmMethod(ctx, 'initMarkerCluster', args) + }, + addMarkers (ctx, args) { + return invokeVmMethod(ctx, 'addMarkers', args) + }, + removeMarkers (ctx, args) { + return invokeVmMethod(ctx, 'removeMarkers', args) + }, + moveAlong (ctx, args) { + return invokeVmMethod(ctx, 'moveAlong', args) + }, + openMapApp (ctx, args) { + return invokeVmMethod(ctx, 'openMapApp', args) } }