简体   繁体   English

以编程方式更改路标的大小?

[英]Change size of road label programmatically?

Can I change the size of road label programmatically? 我可以通过编程方式更改road label的大小吗? In some case, I need to enlarge the road label and restore its original size after a short time. 在某些情况下,我需要放大road label并在短时间内恢复其原始大小。 Currently, I can achieve it by loading another map style and the map will be reloaded completely. 目前,我可以通过加载另一种map style来实现,然后地图将被完全重新加载。 Can anyone give me a suggestion? 谁能给我一个建议?

根据您使用的地图样式,您可以使用mapboxMap.getLayer()获取道路标签图层,然后在假设其为符号图层的情况下设置属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM