当前位置:网站首页>How does mapbox switch markup languages?
How does mapbox switch markup languages?
2022-07-07 05:31:00 【ONEGISER(ZPC)】
Preface
Someone asked how to make mapbox Support Chinese annotation ? The first thing that came to my mind mapbox Chinese net , His address is 《mapbox Chinese map address 》, Style is mapbox://styles/mapbox/streets-zh-v1. Later, it's not like this , Want to set it to Chinese , After inquiry , eureka Language setting plug-in , As for usage, see the documentation . Here is a brief introduction
import MapboxLanguage from '@mapbox/mapbox-gl-language';
const control = new MapboxLanguage({
defaultLanguage: 'en'// default language
})
map.addControl(control)
setTimeout(() => {
// switch language
const style = map.getStyle()
const style2 = control.setLanguage(style, 'zh-Hans')
map.setStyle(style2)
}, 20000);
边栏推荐
- [PM products] what is cognitive load? How to adjust cognitive load reasonably?
- Under the trend of Micah, orebo and apple homekit, how does zhiting stand out?
- Life experience of an update statement
- pytest测试框架——数据驱动
- ssm框架的简单案例
- 张平安:加快云上数字创新,共建产业智慧生态
- Vector and class copy constructors
- 阿里云的神龙架构是怎么工作的 | 科普图解
- 《2》 Label
- Getting started with DES encryption
猜你喜欢
随机推荐
【js组件】date日期显示。
Wonderful express | Tencent cloud database June issue
Design, configuration and points for attention of network specified source multicast (SSM) simulation using OPNET
《2》 Label
JHOK-ZBL1漏电继电器
漏电继电器JD1-100
论文阅读【MM21 Pre-training for Video Understanding Challenge:Video Captioning with Pretraining Techniqu】
Longest non descent subsequence (LIS) (dynamic programming)
实现网页内容可编辑
LabVIEW is opening a new reference, indicating that the memory is full
QSlider of QT control style series (I)
DOM node object + time node comprehensive case
照片选择器CollectionView
做自媒体视频剪辑,专业的人会怎么寻找背景音乐素材?
Initial experience of annotation
CentOS 7.9 installing Oracle 21C Adventures
AIDL 与Service
Creation and use of thread pool
张平安:加快云上数字创新,共建产业智慧生态
JVM (19) -- bytecode and class loading (4) -- talk about class loader again