当前位置:网站首页>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);
边栏推荐
- How Alibaba cloud's DPCA architecture works | popular science diagram
- batch size设置技巧
- Knapsack problem unrelated to profit (depth first search)
- Is the human body sensor easy to use? How to use it? Which do you buy between aqara green rice and Xiaomi
- [JS component] custom select
- Leetcode 1189 maximum number of "balloons" [map] the leetcode road of heroding
- Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting
- EGR-20USCM接地故障继电器
- Annotation初体验
- 人体传感器好不好用?怎么用?Aqara绿米、小米之间到底买哪个
猜你喜欢
随机推荐
Let f (x) = Σ x^n/n^2, prove that f (x) + F (1-x) + lnxln (1-x) = Σ 1/n^2
Record a pressure measurement experience summary
K6el-100 leakage relay
batch size设置技巧
Phenomenon analysis when Autowired annotation is used for list
[question] Compilation Principle
《4》 Form
阿里云的神龙架构是怎么工作的 | 科普图解
LabVIEW is opening a new reference, indicating that the memory is full
Creation and use of thread pool
[optimal web page width and its implementation] [recommended collection "
Simulate thread communication
漏电继电器JOLX-GS62零序孔径Φ100
[JS component] date display.
什么是依赖注入(DI)
Talk about mvcc multi version concurrency controller?
利用OPNET进行网络指定源组播(SSM)仿真的设计、配置及注意点
Scheduledexecutorservice timer
How digitalization affects workflow automation
How can project managers counter attack with NPDP certificates? Look here