UNPKG

kepler.gl

Version:

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

217 lines (209 loc) 32.1 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.addLayerFunctionDefinition = addLayerFunctionDefinition; var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _layers = require("@kepler.gl/layers"); var _utils = require("./utils"); var _reducers = require("@kepler.gl/reducers"); var _react = _interopRequireWildcard(require("react")); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project function addLayerFunctionDefinition(context) { return { name: 'addLayer', description: 'Add a new map layer by specifying the dataset and field.', properties: { datasetName: { type: 'string', description: 'The name of the dataset. If not provided, use the datasetName of the first dataset. Please do not use datastId.' }, layerType: { type: 'string', description: 'The type of the layer. Valid values are "point" (point layer), "arc" (arc layer), "line" (line layer), "grid" (grid layer), "hexagon" (hexagon layer), "geojson" (geojson layer), "cluster" (cluster layer), "heatmap" (heatmap layer), "h3" (h3 layer), "trip" (trip layer) and "s2" (s2 layer). If not provided, the function will try to find the best layer type based on the dataset.' }, fieldName: { type: 'string', description: 'The name of the field of the dataset. If not provided, show all field names from the dataset and ask user to specify one.' }, colorScale: { type: 'string', description: 'The color scale of the layer. The possible values are "quantile", "quantize", "ordinal" or "custom". If not provided, use "quantile". ' }, customColorScale: { type: 'array', items: { type: 'number' }, description: 'An array of numeric breakpoints used to define custom color intervals. Only applicable when colorScale is set to "custom".' } }, required: ['datasetName', 'fieldName', 'colorScale'], callbackFunction: addLayerCallback, callbackFunctionContext: context, callbackMessage: addLayerMessageCallback }; } function addLayerCallback(_ref) { var functionName = _ref.functionName, functionArgs = _ref.functionArgs, functionContext = _ref.functionContext; var _ref2 = functionArgs, datasetName = _ref2.datasetName, fieldName = _ref2.fieldName, layerType = _ref2.layerType, _ref2$colorScale = _ref2.colorScale, colorScale = _ref2$colorScale === void 0 ? 'quantile' : _ref2$colorScale, customColorScale = _ref2.customColorScale; var _ref3 = functionContext, datasets = _ref3.datasets, addLayer = _ref3.addLayer; // check if dataset exists var datasetError = (0, _utils.checkDatasetNotExists)(datasets, datasetName, functionName); var datasetId = Object.keys(datasets).find(function (dataId) { return datasets[dataId].label === datasetName; }); if (datasetError || !datasetId) { return datasetError; } // check if field exists in the dataset var dataset = datasets[datasetId]; var fieldError = (0, _utils.checkFieldNotExists)(dataset, fieldName, functionName); var field = dataset.fields.find(function (f) { return f.name === fieldName; }); if (fieldError || !field) { return fieldError; } // check colorScale is valid if (!['quantile', 'quantize', 'ordinal', 'custom'].includes(colorScale)) { return { type: 'layer', name: functionName, result: { success: false, details: "Invalid color scale: ".concat(colorScale, ". The valid values are \"quantile\", \"quantize\", \"ordinal\" or \"custom\"") } }; } // check if customColorScale is available if (colorScale === 'custom' && !customColorScale) { return { type: 'layer', name: functionName, result: { success: false, details: 'Custom color scale or breaks is required when colorScale is "custom"' } }; } // check if layerType is valid var layer = guessDefaultLayer(dataset, layerType); if (!layer) { return { type: 'layer', name: functionName, result: { success: false, details: "Invalid layer type: ".concat(layerType) } }; } var colorField = { name: field.name, type: field.type }; // create custom colorRange if needed var customColorRange = layer.config.visConfig.colorRange; if (colorScale === 'custom') { var newColors = (0, _utils.interpolateColor)(customColorRange.colors, customColorScale.length + 1); customColorRange = _objectSpread(_objectSpread({}, customColorRange), {}, { colors: newColors, colorMap: newColors.map(function (color, index) { return [customColorScale[index] || null, color]; }) }); } // construct new layer config for addLayer() action var newLayer = { id: layer.id, type: layer.type, config: _objectSpread(_objectSpread({}, layer.config), {}, { dataId: datasetId, label: "".concat(field.name, "-").concat(colorScale), columns: Object.keys(layer.config.columns).reduce(function (acc, key) { acc[key] = layer.config.columns[key].value; return acc; }, {}), colorScale: colorScale, colorField: colorField, strokeColorScale: colorScale, strokeColorField: colorField, visConfig: _objectSpread(_objectSpread({}, layer.config.visConfig), {}, { colorRange: customColorRange, strokeColorRange: customColorRange }, customColorScale ? { colorDomain: customColorScale, strokeColorDomain: customColorScale } : {}) }) }; return { type: 'layer', name: functionName, result: { success: true, layerId: newLayer.id, datasetId: datasetId, layerLabel: newLayer.config.label, layerType: newLayer.type, numberOfColors: customColorRange.colors.length, details: "New map layer with ".concat(field.name, " and ").concat(colorScale, " color scale added successfully.") }, data: { newLayer: newLayer, datasetId: datasetId, addLayer: addLayer } }; } function guessDefaultLayer(dataset, layerType) { // special case for hexagon layer, which could be implemented as findDefaultLayerProps() in hexagon-layer.tsx if (layerType === 'hexagon') { if (dataset.fieldPairs && dataset.fieldPairs.length > 0) { var props = dataset.fieldPairs.map(function (fieldPair) { return { isVisible: true, label: 'Hexbin', columns: fieldPair.pair }; }); var _layer = new _layers.LayerClasses.hexagon(props[0]); return _layer; } } var defaultLayers = (0, _reducers.findDefaultLayer)(dataset, _layers.LayerClasses); var layer = defaultLayers.find(function (l) { return l.type === layerType; }); return layer || defaultLayers.length > 0 ? defaultLayers[0] : null; } function AddLayerMessage(_ref4) { var output = _ref4.output; var outputData = output.data; (0, _react.useEffect)(function () { var _outputData$addLayer; outputData === null || outputData === void 0 || (_outputData$addLayer = outputData.addLayer) === null || _outputData$addLayer === void 0 || _outputData$addLayer.call(outputData, outputData.newLayer, outputData.datasetId); }, [outputData]); return null; } function addLayerMessageCallback(props) { return /*#__PURE__*/_react["default"].createElement(AddLayerMessage, props); } //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbGF5ZXJzIiwicmVxdWlyZSIsIl91dGlscyIsIl9yZWR1Y2VycyIsIl9yZWFjdCIsIl9pbnRlcm9wUmVxdWlyZVdpbGRjYXJkIiwiX2dldFJlcXVpcmVXaWxkY2FyZENhY2hlIiwiZSIsIldlYWtNYXAiLCJyIiwidCIsIl9fZXNNb2R1bGUiLCJfdHlwZW9mIiwiaGFzIiwiZ2V0IiwibiIsIl9fcHJvdG9fXyIsImEiLCJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImdldE93blByb3BlcnR5RGVzY3JpcHRvciIsInUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJpIiwic2V0Iiwib3duS2V5cyIsImtleXMiLCJnZXRPd25Qcm9wZXJ0eVN5bWJvbHMiLCJvIiwiZmlsdGVyIiwiZW51bWVyYWJsZSIsInB1c2giLCJhcHBseSIsIl9vYmplY3RTcHJlYWQiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJmb3JFYWNoIiwiX2RlZmluZVByb3BlcnR5MiIsImdldE93blByb3BlcnR5RGVzY3Jpc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