updateIsLockedToScreen method

Future<bool> updateIsLockedToScreen (
  1. bool isLockedToScreen,
  2. BMFPoint screenPointToLock
)

更新是否锁定在屏幕上的位置

如果isLockedToScreen为false,screenPointToLock需要传null

Implementation

Future<bool> updateIsLockedToScreen(
    bool isLockedToScreen, BMFPoint screenPointToLock) async {
  this.isLockedToScreen = isLockedToScreen;
  this.screenPointToLock = screenPointToLock;

  return await BMFMapDispatcherFactory.instance
      .getMarkerDispatcher()
      .updateMarkerMember(this.getMethodChannel(), {
    'id': this.getId(),
    'member': 'isLockedToScreen',
    'value': isLockedToScreen,
    'screenPointToLock': screenPointToLock.toMap()
  });
}