setApiKeyAndCoordType method

void setApiKeyAndCoordType (
  1. String apiKey,
  2. BMF_COORD_TYPE coordType
)

初始化百度地图sdk

apiKey 百度地图开放平台申请的ak coordType 坐标类型 目前不支持将全局坐标类型设置为WGS84

Implementation

static void setApiKeyAndCoordType(
    String apiKey, BMF_COORD_TYPE coordType) async {
  try {
    await MethodChannel('flutter_bmfbase').invokeMethod(
        kSetAPIKey, {'apiKey': apiKey, 'BMF_COORD_TYPE': coordType.index});
  } on PlatformException catch (e) {
    print(e.toString());
  }
}