Skip to content

wangdejun/bmap-jsapi-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-bmap-jsapi-loader

  • jsapi loader for Baidu map. support dynamic importing, you donot need to import the whole jsapi file in html file。

  • click here to get your ak.

useage:

import BMapLoader from "bmap-jsapi-loader";

BMapLoader.load({
  ak: "your ak", // 百度地图开发者密钥
  type: "webgl", // 加载的 JSAPI 类型
  version: "1.0", // JSAPI 版本
}).then(
  (BMap) => {
    const map = new BMap.Map("bmap-container");
    map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);
  },
  (error) => {
    console.error(error);
  }
);

alt text

About

very simple loader for Baidu map

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published