MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / _matchStyleObject

Method _matchStyleObject

src/openlayers/mapping/WebMap.js:5149–5157  ·  view source on GitHub ↗

* @private * @function mapboxgl.supermap.WebMap.prototype._matchStyleObject * @description 恢复 style 为标准格式。 * @param {Object} style - mapbox 样式。

(style)

Source from the content-addressed store, hash-verified

5147 * @param {Object} style - mapbox 样式。
5148 */
5149 _matchStyleObject(style) {
5150 let { sprite, glyphs } = style;
5151 if (sprite && typeof sprite === 'object') {
5152 style.sprite = Object.values(sprite)[0];
5153 }
5154 if (glyphs && typeof glyphs === 'object') {
5155 style.glyphs = Object.values(glyphs)[0];
5156 }
5157 }
5158
5159 /**
5160 * @private

Callers 1

getMapboxStyleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected