博客 / 詳情

返回

antv-l7高德地圖設置黑色底圖

安裝依賴
@antv/l7-maps
@antv/l7

<div id="map"></div>

import { Scene } from "@antv/l7";
import { GaodeMapV1 } from "@antv/l7-maps";

  scene = new Scene({
    id: "map",
    map: new GaodeMapV1({
      mapStyle:'amap://styles/dark',
      center: [104.288144, 31.239692],
      zoom: 4.4,
      token: 'xxxx - token',
    })
  });

通過mapStyle設置高德地圖底色樣式
官網GaodeMap用法會提示錯誤

user avatar
0 位用戶收藏了這個故事!

發佈 評論

Some HTML is okay.