UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

211 lines (189 loc) 24 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.setBackgroundColor = exports.set3dBuildingColor = exports.requestMapStyles = exports.removeCustomMapStyle = exports.mapStyleChange = exports.mapConfigChange = exports.loadMapStyles = exports.loadMapStyleErr = exports.loadCustomMapStyle = exports.inputMapStyle = exports.editCustomMapStyle = exports.addCustomMapStyle = void 0; var _toolkit = require("@reduxjs/toolkit"); var _actionTypes = _interopRequireDefault(require("./action-types")); // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project /** * Add map style from user input to reducer and set it to current style * This action is called when user click confirm after putting in a valid style url in the custom map style dialog. * It should not be called from outside kepler.gl without a valid `inputStyle` in the `mapStyle` reducer. * param {void} * @memberof mapStyleActions * @public */ var addCustomMapStyle = exports.addCustomMapStyle = (0, _toolkit.createAction)(_actionTypes["default"].ADD_CUSTOM_MAP_STYLE); /** * Edit map style from user input to reducer. * This action is called when user clicks confirm after editing an existing custom style in the custom map style dialog. * It should not be called from outside kepler.gl without a valid `inputStyle` in the `mapStyle` reducer. * param {void} * @memberof mapStyleActions * @public */ var editCustomMapStyle = exports.editCustomMapStyle = (0, _toolkit.createAction)(_actionTypes["default"].EDIT_CUSTOM_MAP_STYLE); /** * Remove a custom map style from `state.mapStyle.mapStyles`. * @param id * @memberof mapStyleActions * @public */ var removeCustomMapStyle = exports.removeCustomMapStyle = (0, _toolkit.createAction)(_actionTypes["default"].REMOVE_CUSTOM_MAP_STYLE, function (_ref) { var id = _ref.id; return { payload: { id: id } }; }); /** INPUT_MAP_STYLE */ /** * Input a custom map style object * @memberof mapStyleActions * @param inputStyle * @param inputStyle.url - style url e.g. `'mapbox://styles/heshan/xxxxxyyyyzzz'` * @param inputStyle.id - style id e.g. `'custom_style_1'` * @param inputStyle.style - actual mapbox style json * @param inputStyle.label - style name * @param inputStyle.accessToken - mapbox access token * @param inputStyle.icon - icon image data url * @param [mapState] - mapState is optional * @public */ var inputMapStyle = exports.inputMapStyle = (0, _toolkit.createAction)(_actionTypes["default"].INPUT_MAP_STYLE, function (inputStyle, mapState) { return { payload: { inputStyle: inputStyle, mapState: mapState } }; }); /** MAP_CONFIG_CHANGE */ /** * Update `visibleLayerGroups`to change layer group visibility * @memberof mapStyleActions * @param mapStyle new config `{visibleLayerGroups: {label: false, road: true, background: true}}` * @public */ var mapConfigChange = exports.mapConfigChange = (0, _toolkit.createAction)(_actionTypes["default"].MAP_CONFIG_CHANGE, function (mapStyle) { return { payload: mapStyle }; }); /** REQUEST_MAP_STYLES */ /** * Request map style style object based on style.url. * @memberof mapStyleActions * @public */ var requestMapStyles = exports.requestMapStyles = (0, _toolkit.createAction)(_actionTypes["default"].REQUEST_MAP_STYLES, function (mapStyles, onSuccess) { return { payload: { mapStyles: mapStyles, onSuccess: onSuccess } }; }); /** LOAD_MAP_STYLES */ /** * Callback when load map style success * @memberof mapStyleActions * @param newStyles a `{[id]: style}` mapping * @public */ var loadMapStyles = exports.loadMapStyles = (0, _toolkit.createAction)(_actionTypes["default"].LOAD_MAP_STYLES, function (newStyles, onSuccess) { return { payload: { newStyles: newStyles, onSuccess: onSuccess } }; }); /** LOAD_MAP_STYLE_ERR */ /** * Callback when load map style error * @memberof mapStyleActions * @param ids * @param error * @public */ var loadMapStyleErr = exports.loadMapStyleErr = (0, _toolkit.createAction)(_actionTypes["default"].LOAD_MAP_STYLE_ERR, function (ids, error) { return { payload: { ids: ids, error: error } }; }); /** MAP_STYLE_CHANGE */ /** * Change to another map style. The selected style should already been loaded into `mapStyle.mapStyles` * @memberof mapStyleActions * @param styleType the style to change to * @param onSuccess optional success callback function when an asynchronous basemap syle has loaded * @public */ var mapStyleChange = exports.mapStyleChange = (0, _toolkit.createAction)(_actionTypes["default"].MAP_STYLE_CHANGE, function (styleType, onSuccess) { return { payload: { styleType: styleType, onSuccess: onSuccess } }; }); /** LOAD_CUSTOM_MAP_STYLE */ /** * Callback when a custom map style object is received * @memberof mapStyleActions * @param customMapStyle * @param customMapStyle.icon * @param customMapStyle.style * @param customMapStyle.error * @public */ var loadCustomMapStyle = exports.loadCustomMapStyle = (0, _toolkit.createAction)(_actionTypes["default"].LOAD_CUSTOM_MAP_STYLE, function (customMapStyle) { return { payload: customMapStyle }; }); /** SET_3D_BUILDING_COLOR */ // SET_3D_BUILDING_COLOR /** * Set 3d building layer group color * @memberof mapStyleActions * @param color - [r, g, b] * @public */ var set3dBuildingColor = exports.set3dBuildingColor = (0, _toolkit.createAction)(_actionTypes["default"].SET_3D_BUILDING_COLOR, function (color) { return { payload: color }; }); /** SET_BACKGROUND_COLOR */ /** * Set background color * @memberof mapStyleActions * @param color - [r, g, b] * @public */ var setBackgroundColor = exports.setBackgroundColor = (0, _toolkit.createAction)(_actionTypes["default"].SET_BACKGROUND_COLOR, function (color) { return { payload: color }; }); /** * Actions handled mostly by `mapStyle` reducer. * They manage the display of base map, such as loading and receiving base map styles, * hiding and showing map layers, user input of custom map style url. * * @public */ /* eslint-disable @typescript-eslint/no-unused-vars */ // @ts-ignore var mapStyleActions = null; /* eslint-enable @typescript-eslint/no-unused-vars */ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfdG9vbGtpdCIsInJlcXVpcmUiLCJfYWN0aW9uVHlwZXMiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwiYWRkQ3VzdG9tTWFwU3R5bGUiLCJleHBvcnRzIiwiY3JlYXRlQWN0aW9uIiwiQWN0aW9uVHlwZXMiLCJBRERfQ1VTVE9NX01BUF9TVFlMRSIsImVkaXRDdXN0b21NYXBTdHlsZSIsIkVESVRfQ1VTVE9NX01BUF9TVFlMRSIsInJlbW92ZUN1c3RvbU1hcFN0eWxlIiwiUkVNT1ZFX0NVU1RPTV9NQVBfU1RZTEUiLCJfcmVmIiwiaWQiLCJwYXlsb2FkI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