mapbox-developer-group / Mapbox-Tech-Q-A

在提问之前请自行查看文档哦,养成好习惯:https://docs.mapbox.com/
32 stars 1 forks source link

mapbox加载自己发布的WMS地图服务后显示属性注记 #26

Open 641695615 opened 4 years ago

641695615 commented 4 years ago

我遇到的问题

想在自己发布的WMS服务加载后显示属性注记在图形旁边

我遇到的问题截图

image 就像上图显示这样,mapbox加载WMS后这样显示注记

该问题的类别

web

canglaoshidaidui commented 4 years ago

才刷出你的图,忽略我的回答吧...

641695615 commented 4 years ago

啊?我还以为是我的问题...这个还有其他方式能实现这个效果吗?

canglaoshidaidui commented 4 years ago

1576121423

是这种么? 似乎可以做到这是它的样式你参考下。

{ "id": "省道_注记名称", "source": "dt_provincialroad", "type": "symbol", "minzoom": 8, "maxzoom": 18, "layout": { "text-field": "{lxmc}", "text-font": [ "Microsoft YaHei Regular" ], "text-size": { "stops": [ [ 8, 12.5 ], [ 9, 13 ], [ 10, 13.5 ], [ 11, 14 ], [ 12, 14.5 ], [ 13, 15 ], [ 14, 15.5 ], [ 15, 16 ], [ 16, 16.5 ], [ 17, 17 ], [ 18, 17.5 ] ] }, "symbol-placement": "line", "text-anchor": "center", "symbol-spacing": 200 }, "paint": { "text-opacity": 1, "text-color": "#000000", "text-halo-color": "#ffffff", "text-halo-width": 2, "text-halo-blur": 1 }, "source-layer": "dt_provincialroad", "metadata": { "mapbox:group": "b4b8273f9aff7" }, "visibility": "visible" }

641695615 commented 4 years ago

嗯嗯,可以啦,非常感谢!