mle 0880 - izudon/izudon.github.io GitHub Wiki
0880 Variable label placement with offset
map.addLayer({
'type': 'symbol',
'layout': {
'text-field': ['get', 'description'],
'text-variable-anchor-offset': ['top', [0, 1], 'bottom', [0, -2], 'left', [1, 0], 'right', [-2, 0]],
// :
- テキストアンカが 上 下 左 右 それぞれになったときの、表示位置オフセットを指定できる。
- ひとつ前の 0870 Variable label placement と同一位置で画面表示して見比べてもらえれば、
指定通りテキストの表示位置が微調整されて最後止まっていることがわかる。
- MapLibre Examples
Add a comment on every example of MapLibre GL JS by Masakazu IZUI