maptalks.js icon indicating copy to clipboard operation
maptalks.js copied to clipboard

VectorLayer高度墙drawAltitude倾斜视角下底部无法贴地

Open johnnylc opened this issue 2 months ago • 0 comments

VectorLayer绘制LineString高度墙drawAltitude,当视角靠近时墙体底部悬浮在空中,无法贴地如下图所示

var map = new maptalks.Map('map', {
  center: [120, 40],
  zoom: 14,
  pitch: 56,
  bearing: 60,
  baseLayer: new maptalks.TileLayer('base', {
    urlTemplate: 'https://webst01.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
    subdomains: ["a", "b", "c", "d"],
    attribution: '© <a href="http://osm.org">OpenStreetMap</a>  contributors, © <a href="https://carto.com/">CARTO</a> '
  })
});

var line = new maptalks.LineString([
  [120, 40, 200],
  [120.1, 40.2, 400],
  [120.2, 40.1, 600],
  [120.3, 40.3, 800],
  [120.4, 40.5, 1200]
], {
  symbol: {
    'lineColor': '#1bbc9b',
    'lineWidth': 3
  }
});

new maptalks.VectorLayer('vector', [line], {
  enableAltitude: true,
  drawAltitude: {
    polygonFill: '#1bbc9b',
    polygonOpacity: 0.3,
    lineWidth: 0
  }
}).addTo(map);
Image

johnnylc avatar Nov 06 '25 10:11 johnnylc