@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
35 lines (34 loc) • 1.86 kB
JavaScript
var _a;
import { getLightStyle, getDarkStyle, getEleganceGreenStyle, getStreetsStyle, getOutdoorsStyle } from './mapThemeStyle';
import { WORLD_VIEW, MapboxThemeTypes } from './mapThemeStyle/constant';
var createStylesLight = function (queryPath, _a) {
var worldView = _a.worldView, tilePath = _a.tilePath;
return getLightStyle(queryPath, { worldView: worldView, tilePath: tilePath });
};
var createStylesDark = function (queryPath, _a) {
var worldView = _a.worldView, tilePath = _a.tilePath;
return getDarkStyle(queryPath, { worldView: worldView, tilePath: tilePath });
};
var createStylesEleganceGreen = function (queryPath, _a) {
var worldView = _a.worldView, tilePath = _a.tilePath;
return getEleganceGreenStyle(queryPath, { worldView: worldView, tilePath: tilePath });
};
var createStylesStreets = function (queryPath, _a) {
var worldView = _a.worldView, tilePath = _a.tilePath;
return getStreetsStyle(queryPath, { worldView: worldView, tilePath: tilePath });
};
var createStylesOutdoors = function (queryPath, _a) {
var worldView = _a.worldView, tilePath = _a.tilePath;
return getOutdoorsStyle(queryPath, { worldView: worldView, tilePath: tilePath });
};
var createStylesMap = (_a = {},
_a[MapboxThemeTypes.Light] = createStylesLight,
_a[MapboxThemeTypes.Dark] = createStylesDark,
_a[MapboxThemeTypes.EleganceGreen] = createStylesEleganceGreen,
_a[MapboxThemeTypes.Outdoors] = createStylesOutdoors,
_a[MapboxThemeTypes.Streets] = createStylesStreets,
_a);
export var createStyles = function (queryPath, _a) {
var _b = _a.worldView, worldView = _b === void 0 ? WORLD_VIEW.CN : _b, _c = _a.mapThemeType, mapThemeType = _c === void 0 ? MapboxThemeTypes.Light : _c, tilePath = _a.tilePath;
return createStylesMap[mapThemeType](queryPath, { worldView: worldView, tilePath: tilePath });
};