We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
做地图文字标记的时候,数字和汉字错位了,有什么办法能让他们对齐?
这是我的代码 map.addLayer({ "id": "nonghumarkers", "type": "symbol", "source": "nonghulayer", "layout": {}, "layout": { "text-field":"{name}"+ "{area}"+"亩", "text-font": ["Arial Regular"], // "text-letter-spacing":0.2, // "text-pitch-alignment":"map", "text-line-height":1, "text-size": 33
}, "paint": { "text-color": '#FFFFFF', }, });
这个是截图
另外我尝试了在Mapboxstudio上做文字标注,然后在本地请求查看也是这样 这个是Mapboxstudio上的 然后这个是我放本地看的情况
Web
The text was updated successfully, but these errors were encountered:
中英文字体的基线不一致,你需要用最新版本的fontnik重新生成一遍字体,并将mapbox-gl更新到最新版本
Sorry, something went wrong.
No branches or pull requests
做地图文字标记的时候,数字和汉字错位了,有什么办法能让他们对齐?
我遇到的问题截图
这是我的代码
map.addLayer({
"id": "nonghumarkers",
"type": "symbol",
"source": "nonghulayer",
"layout": {},
"layout": {
"text-field":"{name}"+ "{area}"+"亩",
"text-font": ["Arial Regular"],
// "text-letter-spacing":0.2,
// "text-pitch-alignment":"map",
"text-line-height":1,
"text-size": 33
这个是截图
另外我尝试了在Mapboxstudio上做文字标注,然后在本地请求查看也是这样
这个是Mapboxstudio上的
然后这个是我放本地看的情况
该问题的类别
Web
The text was updated successfully, but these errors were encountered: