Skip to content

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

@johnnylc

Description

@johnnylc

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions