getMapList(params: Object)

Requires:
MapKit≥2.1.0@ray-js/ray≥1.2.10
Platforms:
iOSAndroid
import { map } from '@ray-js/ray';

const { getMapList } = map;

// Promise usage
try {
  const res = await getMapList();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Get available third-party map types

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
success(params: Object) => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
success callback parameters
PropertyTypeDescriptionMapKit Since
mapsstring[]Supported map providers. Currently supported: BMK: Baidu Maps, MA: Amap, TENCENT: Tencent Maps, Google: Google Mapsv3.0.5
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { map } from '@ray-js/ray'

map.getMapList({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});