当前位置:网站首页>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);
边栏推荐
- [论文阅读] Semi-supervised Left Atrium Segmentation with Mutual Consistency Training
- 做自媒体,有哪些免费下载视频剪辑素材的网站?
- Batch size setting skills
- 漏电继电器JD1-100
- K6EL-100漏电继电器
- 京东商品详情页API接口、京东商品销量API接口、京东商品列表API接口、京东APP详情API接口、京东详情API接口,京东SKU信息接口
- 纪念下,我从CSDN搬家到博客园啦!
- 阿里云的神龙架构是怎么工作的 | 科普图解
- How does redis implement multiple zones?
- Getting started with DES encryption
猜你喜欢
Use Zhiyun reader to translate statistical genetics books
[binary tree] binary tree path finding
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
论文阅读【Open-book Video Captioning with Retrieve-Copy-Generate Network】
漏电继电器JD1-100
什么是依赖注入(DI)
Photo selector collectionview
Zero sequence aperture of leakage relay jolx-gs62 Φ one hundred
sql优化常用技巧及理解
实现网页内容可编辑
随机推荐
[PM products] what is cognitive load? How to adjust cognitive load reasonably?
导航栏根据路由变换颜色
Leakage relay llj-100fs
AOSP ~binder communication principle (I) - Overview
QSlider of QT control style series (I)
张平安:加快云上数字创新,共建产业智慧生态
DFS, BFS and traversal search of Graphs
AIDL 与Service
10 distributed databases that take you to the galaxy
ThinkPHP Association preload with
论文阅读【MM21 Pre-training for Video Understanding Challenge:Video Captioning with Pretraining Techniqu】
App clear data source code tracking
利用OPNET进行网络仿真时网络层协议(以QoS为例)的使用、配置及注意点
Array initialization of local variables
Initial experience of annotation
MySQL数据库学习(7) -- pymysql简单介绍
[binary tree] binary tree path finding
Wonderful express | Tencent cloud database June issue
人体传感器好不好用?怎么用?Aqara绿米、小米之间到底买哪个
京东商品详情页API接口、京东商品销量API接口、京东商品列表API接口、京东APP详情API接口、京东详情API接口,京东SKU信息接口