0%

mapbox

mac 鼠标速度

查看

1
defaults read -g com.apple.mouse.scaling 

设置 (推荐 8 - 10)

1
defaults write -g com.apple.mouse.scaling 8

via https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#layout-line-line-miter-limit

line-cap 两头

  • butt 默认
  • round 圆角
  • square (感觉就是 butt 前进了一步)

Layout property. Optional enum. One of “butt”, “round”, “square”. Defaults to “butt”.

1
test.map.setLayoutProperty('layer_goudao','line-cap','round')

line-join 拐弯

默认是 miter

  • bevel 拐弯是直的
  • round 圆角
  • miter 默认

Layout property. Optional enum. One of “bevel”, “round”, “miter”. Defaults to “miter”.

1
test.map.setLayoutProperty('layer_goudao','line-join','round')

line-miter-limit

拐弯:修饰 尖角

Layout property. Optional number. Defaults to 2. Requires line-join to be “miter”. Supports interpolateexpressions.

Used to automatically convert miter joins to bevel joins for sharp angles.

line-round-limit

如果 line-join 是 “round” 的情况下 浅角(尖角的相反)

拐弯:修饰 浅角

Layout property. Optional number. Defaults to 1.05. Requires line-join to be “round”. Supports interpolateexpressions.

Used to automatically convert round joins to miter joins for shallow angles.

line-pattern

宽度必须偶数

Paint property. Optional resolvedImage. Transitionable.

Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, …, 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.

line-offset

(线自己的)左右偏移(像素)

Paint property.

line-translate

偏移

Paint property. Optional array of numbers. Units in pixels. Defaults to [0,0]. Supports interpolateexpressions. Transitionable.

mapbox 铁路 层

{
“id”: “Railway/1”,
“type”: “line”,
“source”: “epgis”,
“source-layer”: “Railway”,
“minzoom”: 10,
“filter”: [
“==”,
“_symbol”,
0
],
“layout”: {
“line-join”: “round”,
“visibility”: “visible”
},
“paint”: {
“line-opacity”: 1,
“line-color”: “#fff”,
“line-width”: 2.66667
}
}

{
“id”: “Railway/0”,
“type”: “line”,
“source”: “epgis”,
“source-layer”: “Railway”,
“minzoom”: 10,
“filter”: [
“==”,
“_symbol”,
0
],
“layout”: {
“line-join”: “round”,
“visibility”: “visible”
},
“paint”: {
“line-opacity”: 1,
“line-color”: “red”,
“line-dasharray”: [
6,
6
],
“line-width”: [
“interpolate”,
[
“linear”
],
[
“zoom”
],
7, 1, 8, 2
]
}
}

楼层

fs = test.map.querySourceFeatures(“epgis”, {
sourceLayer: ‘Building’,
});

test.map.setLayerZoomRange(‘Building’, 7, 20);

test.map.getStyle().layers.find(a=>{
return a.id == ‘Building’
})

)

====

隐藏 光缆层

test.map.setLayoutProperty(‘layer_line’,’visibility’,’none’)

显示 光缆层

test.map.setLayoutProperty(‘layer_line’,’visibility’,’visible’)

切换 沟道 line-pattern( line2 line3 line4 line5 )

test.map.setPaintProperty(‘layer_goudao’,’line-pattern’,’line5’)

切换 沟道 透明度

test.map.setPaintProperty(‘layer_goudao’,’line-opacity’,.8)

if(1==1){
let c = 123
console.log(c)
}

if(2==2){
let c = 456
console.log(c)
}

console.log(c)

====

test.map.setLayoutProperty(‘temp_line’,’visibility’,’visible’) // none

test.map.setLayoutProperty(‘layer_goudao_text3’,’visibility’,’none’)

test.map.moveLayer(‘layer_goudao_text3’,’temp_line’)

test.map.setLayoutProperty(‘temp_line’,’visibility’,’none’)

mapbox mask 交错 bug

preserveDrawingBuffer:true,

mac 安装 telnet

https://hakk.dev/blog/posts/getting-telnet-on-macos-catalina/#:~:text=Installing%20Telnet%20on%20MacOS%20by%20Building%20Telnet%20from,Extract%20the%20source%204%20Configure%20and%20build.%20