代码
const map = new BMap.Map('map');
map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);
map.setTilt(45);
map.setMapStyle({
  styleJson: darkStyle,
  merge: true,
});

const data = {
  type: 'FeatureCollection',
  features: [
    {
      type: 'Feature',
      properties: {name: '东城区', value: 96, height: 4800},
      geometry: {type: 'Point', coordinates: [116.418, 39.917]},
    },
    {
      type: 'Feature',
      properties: {name: '西城区', value: 112, height: 5600},
      geometry: {type: 'Point', coordinates: [116.366, 39.912]},
    },
    {
      type: 'Feature',
      properties: {name: '朝阳区', value: 275, height: 13750},
      geometry: {type: 'Point', coordinates: [116.486, 39.921]},
    },
    {
      type: 'Feature',
      properties: {name: '丰台区', value: 202, height: 10100},
      geometry: {type: 'Point', coordinates: [116.287, 39.858]},
    },
    {
      type: 'Feature',
      properties: {name: '石景山区', value: 85, height: 4250},
      geometry: {type: 'Point', coordinates: [116.223, 39.906]},
    },
    {
      type: 'Feature',
      properties: {name: '海淀区', value: 258, height: 12900},
      geometry: {type: 'Point', coordinates: [116.298, 39.959]},
    },
    {
      type: 'Feature',
      properties: {name: '门头沟区', value: 92, height: 4600},
      geometry: {type: 'Point', coordinates: [116.102, 39.94]},
    },
    {
      type: 'Feature',
      properties: {name: '房山区', value: 148, height: 7400},
      geometry: {type: 'Point', coordinates: [116.143, 39.749]},
    },
    {
      type: 'Feature',
      properties: {name: '通州区', value: 196, height: 9800},
      geometry: {type: 'Point', coordinates: [116.658, 39.902]},
    },
    {
      type: 'Feature',
      properties: {name: '顺义区', value: 165, height: 8250},
      geometry: {type: 'Point', coordinates: [116.654, 40.13]},
    },
    {
      type: 'Feature',
      properties: {name: '昌平区', value: 234, height: 11700},
      geometry: {type: 'Point', coordinates: [116.235, 40.221]},
    },
    {
      type: 'Feature',
      properties: {name: '大兴区', value: 212, height: 10600},
      geometry: {type: 'Point', coordinates: [116.338, 39.729]},
    },
    {
      type: 'Feature',
      properties: {name: '怀柔区', value: 104, height: 5200},
      geometry: {type: 'Point', coordinates: [116.637, 40.316]},
    },
    {
      type: 'Feature',
      properties: {name: '平谷区', value: 118, height: 5900},
      geometry: {type: 'Point', coordinates: [117.112, 40.144]},
    },
    {
      type: 'Feature',
      properties: {name: '密云区', value: 128, height: 6400},
      geometry: {type: 'Point', coordinates: [116.843, 40.377]},
    },
    {
      type: 'Feature',
      properties: {name: '延庆区', value: 88, height: 4400},
      geometry: {type: 'Point', coordinates: [115.985, 40.465]},
    },
  ],
};

const layer = new BMap.BarLayer({
  renderStage: 'poi',
  color: 'rgba(0, 100, 255, 1)',
  size: 2000, // 单位(米)
});
layer.setData(data);
map.addLayer(layer);

BMap.BarLayer 叠加柱状图

预览