【发布时间】:2021-06-16 09:29:50
【问题描述】:
我正在使用 Ionic angular 和 Mapbox。我也想知道加载 mapbox 主题时应用了哪个主题...
类似这样的:
const currentIonicTheme = ionic.theme.apllied; // here is where I want to know how to get the current theme in the app
const map = new mapboxgl.Map({
style: `mapbox://styles/mapbox/${currentIonicTheme}-v10`,
center: [this.lng, this.lat],
zoom: 15.5,
pitch: 45,
bearing: -17.6,
container: 'map',
antialias: true
});
有什么方法可以根据应用中的主题调用 /mapbox/light-v10 或 /mabox/dark-v10 吗?
【问题讨论】:
标签: angular ionic-framework android-dark-theme darkmode