import AMapLoader from "@amap/amap-jsapi-loader";

export const loadMap = async (plugins) => {
  try {
    return await AMapLoader.load({
      key: "377d7c36dd385e2a722f29d4c6e1ffbf",
      version: "2.0",
      plugins,
    });
  } catch (e) {
    console.log(e);
  }
};

// export const loadMapPlugin = () => new Promise((resolve, reject) => {
//   AMap.plugin()
// });
