Skip to content

简单地图

loading

有的时候,我们仅需要显示不含卫星影像,仅包含境界、地名的简单地图,甚至不需要地形的二维地图, 但由于境界、地名瓦片背景透明,地图无背景色时无法将会传统到地下。

所以 V0.11.4 TileMap 增加了背景色属性:backgroundColor。

ts
// 创建地图
const map = tt.TileMap.create({
  // 影像数据源
  imgSource: new plugin.GDSource({ style: 7 }),
  lon0: 90,
  minLevel: 2,
  backgroundColor: 0xfbf6e4,
});


Released under the MIT License.