@vuemap/amap-jsapi-loader
Version:
高德官网提供的地图JSAPI加载器,可以避免多种异步加载API的错误用法
18 lines (16 loc) • 345 B
text/typescript
import AMapLoader from "../";
// import { } from "@ali/test-amap-jsapi";
AMapLoader.load({
key: "test",
version: "2.0"
}).then(() => {
new AMap.Circle({})
const map = new AMap.Map("div");
map.on("complete", () => {
const circle = new AMap.Circle({
center: [135, 45],
radius: 40
});
map.add(circle);
});
});