Pang Chun Lam
Pang Chun Lam
Here is another hack solution to control the Standard style's layers https://github.com/mapbox/mapbox-gl-js/issues/12950#issuecomment-2268447518
> > Here is another hack solution to control the Standard style's layers [#12950 (comment)](https://github.com/mapbox/mapbox-gl-js/issues/12950#issuecomment-2268447518) > > Nice! Yes! Your solution seems similar to my work-around for updating layers in...
To change the map language after loaded, you can use the following code ```js let localeName = 'name_zh-Hans' // 'name_en' for (const layerId in map.style._mergedLayers) { const layer = map.style._mergedLayers[layerId]...
Some types are not exported, such as Marker Options, ControlPosition, EasingOptions, StyleImageInterface
``` const scale = new mapboxgl.ScaleControl({ maxWidth: 80 }); map.addControl(scale, controlsPosition); ``` Argument of type 'ScaleControl' is not assignable to parameter of type 'IControl'. Types of property '_setLanguage' are incompatible.
```js new mapboxgl.Popup().on('close', () => {}); ``` Argument of type '"close"' is not assignable to parameter of type 'MapEvent'.
```js map.addLayer({ 'id': 'tower', 'type': 'model', 'source': 'model', 'layout': { 'model-id': ['get', 'model-uri'] }, 'paint': { 'model-cast-shadows': true, } }); ``` Type 'boolean' is not assignable to type '[string, ...any[]]'.ts(2322)...
```js map.addLayer({ 'id': 'tower', 'type': 'model', 'source': 'model', 'layout': { 'model-id': ['get', 'model-uri'] }, 'paint': { 'model-rotation': [0.0, 0.0, ['get', 'rotate']], } }); ``` Type '[number, number, string[]]' is not...
```js map.setLights([ { "id": "directional", "type": "directional", "properties": { "cast-shadows": true, } } ]) ``` Type 'boolean' is not assignable to type '[string, ...any[]]'.ts(2322) `(property) "cast-shadows"?: ExpressionSpecification | undefined`
Are the following code repeated? https://github.com/cssninjaStudio/unplugin-fonts/blob/a7e66d594e2c7e0a2cccfed7c15a069ffebb96c1/src/index.ts#L92-L102 https://github.com/cssninjaStudio/unplugin-fonts/blob/a7e66d594e2c7e0a2cccfed7c15a069ffebb96c1/src/index.ts#L126-L136