setCustomMapStyle method

Future<bool> setCustomMapStyle (
  1. String path,
  2. int mode
)

设置个性化地图样式路径,仅影响当前mapView对象,需在对象创建后调用

path 本地个性化样式文件所在路径,包含文件名

mode 加载模式,0:加载本地文件 1:加载在线文件或在线缓存文件

bool 成功返回true 失败false

Implementation

Future<bool> setCustomMapStyle(String path, int mode) async {
  return await BMFMapDispatcherFactory.instance
      .getMapStateDispatcher()
      .setCustomMapStylePathDispatch(_mapChannel, path, mode);
}