kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
373 lines (361 loc) • 45.9 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.wmsTileVisConfigs = exports["default"] = void 0;
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _commonUtils = require("@kepler.gl/common-utils");
var _constants = require("@kepler.gl/constants");
var _deckglLayers = require("@kepler.gl/deckgl-layers");
var _tileDataset = _interopRequireDefault(require("../vector-tile/common-tile/tile-dataset"));
var _wmsLayerIcon = _interopRequireDefault(require("./wms-layer-icon"));
var _abstractTileLayer = _interopRequireDefault(require("../vector-tile/abstract-tile-layer"));
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; }
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
function _superPropGet(t, e, r, o) { var p = (0, _get2["default"])((0, _getPrototypeOf2["default"])(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; } // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
// Types
var wmsTileVisConfigs = exports.wmsTileVisConfigs = {
opacity: 'opacity',
transparent: 'transparent'
};
// Extend visConfigSettings to satisfy AbstractTileLayer
// Extend LayerData for WMS
// Class Definition
var WMSLayer = exports["default"] = /*#__PURE__*/function (_AbstractTileLayer) {
// Constructor
function WMSLayer(props) {
var _props$layers$, _props$layers;
var _this;
(0, _classCallCheck2["default"])(this, WMSLayer);
_this = _callSuper(this, WMSLayer, [props]);
// Store reference to the deck layer for feature info access
(0, _defineProperty2["default"])(_this, "deckLayerRef", null);
var defaultWmsLayer = (_props$layers$ = (_props$layers = props.layers) === null || _props$layers === void 0 ? void 0 : _props$layers[0]) !== null && _props$layers$ !== void 0 ? _props$layers$ : null;
_this.registerVisConfig(wmsTileVisConfigs);
_this.updateLayerVisConfig({
opacity: 0.8,
// Default opacity
wmsLayer: defaultWmsLayer,
transparent: true
});
return _this;
}
// Properties
(0, _inherits2["default"])(WMSLayer, _AbstractTileLayer);
return (0, _createClass2["default"])(WMSLayer, [{
key: "type",
get: function get() {
return _constants.LAYER_TYPES.wms;
}
}, {
key: "name",
get: function get() {
return 'WMS Tile';
}
}, {
key: "layerIcon",
get: function get() {
return _wmsLayerIcon["default"];
}
// Static Methods
}, {
key: "supportedDatasetTypes",
get:
// Instance Methods
function get() {
return [_constants.DatasetType.WMS_TILE];
}
}, {
key: "initTileDataset",
value: function initTileDataset() {
// Provide dummy accessors for raster/WMS
return new _tileDataset["default"]({
getTileId: function getTileId(tile) {
return (tile === null || tile === void 0 ? void 0 : tile.id) || 'wms';
},
getIterable: function getIterable(_tile) {
return [];
},
getRowCount: function getRowCount() {
return 0;
},
getRowValue: function getRowValue() {
return function () {
return null;
};
}
});
}
}, {
key: "accessRowValue",
value: function accessRowValue(_field, _indexKey) {
// WMS layers are raster, so no row access; return a dummy accessor
return function () {
return null;
};
}
}, {
key: "formatLayerData",
value: function formatLayerData(datasets, oldLayerData, animationConfig) {
var dataId = this.config.dataId;
if (!(0, _commonUtils.notNullorUndefined)(dataId) || !datasets[dataId]) {
return {
tilesetDataUrl: null,
metadata: null
};
}
var dataset = datasets[dataId];
var metadata = dataset === null || dataset === void 0 ? void 0 : dataset.metadata;
return _objectSpread(_objectSpread({}, _superPropGet(WMSLayer, "formatLayerData", this, 3)([datasets, oldLayerData, animationConfig])), {}, {
tilesetDataUrl: (metadata === null || metadata === void 0 ? void 0 : metadata.tilesetDataUrl) || null,
// URL for WMS tiles
metadata: dataset === null || dataset === void 0 ? void 0 : dataset.metadata
});
}
}, {
key: "_getCurrentServiceLayer",
value: function _getCurrentServiceLayer() {
var _visConfig$wmsLayer;
var visConfig = this.config.visConfig;
return (_visConfig$wmsLayer = visConfig.wmsLayer) !== null && _visConfig$wmsLayer !== void 0 ? _visConfig$wmsLayer : null;
}
}, {
key: "updateLayerMeta",
value: function updateLayerMeta(dataset) {
if (dataset.type !== _constants.DatasetType.WMS_TILE) {
return;
}
var currentLayer = this._getCurrentServiceLayer();
if (currentLayer && currentLayer.boundingBox) {
this.updateMeta({
bounds: currentLayer.boundingBox
});
}
}
}, {
key: "hasHoveredObject",
value: function hasHoveredObject(objectInfo) {
// For WMS layers, we consider it hovered if the layer is picked
// The actual feature info will be retrieved via getHoverData
if (this.isLayerHovered(objectInfo)) {
return _objectSpread({
index: 0
}, objectInfo);
}
return null;
}
}, {
key: "getHoverData",
value: function getHoverData(object, dataContainer, fields, animationConfig, hoverInfo) {
// Check if this is a WMS feature info object from clicked state
if (object !== null && object !== void 0 && object.wmsFeatureInfo) {
if (Array.isArray(object.wmsFeatureInfo)) {
return {
wmsFeatureData: object.wmsFeatureInfo
};
}
return {
wmsFeatureData: [{
name: 'WMS Feature Info',
value: object.wmsFeatureInfo
}]
};
}
if (hoverInfo.x !== undefined && hoverInfo.y !== undefined) {
return {
fieldValues: [{
labelMessage: 'layer.wms.hover',
value: 'Click to query WMS feature info'
}]
};
}
return null;
}
}, {
key: "renderLayer",
value: function renderLayer(opts) {
var _interactionConfig$to;
var visConfig = this.config.visConfig;
var data = opts.data,
interactionConfig = opts.interactionConfig,
layerCallbacks = opts.layerCallbacks;
var wmsLayer = this._getCurrentServiceLayer();
if (!wmsLayer) {
return [];
}
var wmsLayerName = wmsLayer.name,
queryable = wmsLayer.queryable;
var defaultLayerProps = this.getDefaultDeckLayerProps(opts);
var pickable = (interactionConfig === null || interactionConfig === void 0 || (_interactionConfig$to = interactionConfig.tooltip) === null || _interactionConfig$to === void 0 ? void 0 : _interactionConfig$to.enabled) && queryable;
var deckLayer = new _deckglLayers.WMSLayer({
id: "".concat(this.id, "-WMSLayer"),
idx: defaultLayerProps.idx,
serviceType: 'wms',
data: data.tilesetDataUrl,
layers: [wmsLayerName],
opacity: visConfig.opacity,
transparent: visConfig.transparent,
pickable: pickable,
// @ts-ignore
onClick: pickable ? this._onClick.bind(this, layerCallbacks) : null
});
// Store reference to the deck layer for feature info access
this.deckLayerRef = deckLayer;
return [deckLayer];
}
}, {
key: "_onClick",
value: function () {
var _onClick2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(layerCallbacks, _ref) {
var bitmap, coordinate, x, y, featureInfo;
return _regenerator["default"].wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
bitmap = _ref.bitmap, coordinate = _ref.coordinate;
if (bitmap) {
_context.next = 3;
break;
}
return _context.abrupt("return", null);
case 3:
x = bitmap.pixel[0];
y = bitmap.pixel[1];
_context.next = 7;
return this.getWMSFeatureInfo(x, y);
case 7:
featureInfo = _context.sent;
// Call the callback to update state with coordinate
if (layerCallbacks !== null && layerCallbacks !== void 0 && layerCallbacks.onWMSFeatureInfo) {
layerCallbacks.onWMSFeatureInfo({
featureInfo: featureInfo,
coordinate: coordinate
});
}
return _context.abrupt("return", featureInfo);
case 10:
case "end":
return _context.stop();
}
}, _callee, this);
}));
function _onClick(_x, _x2) {
return _onClick2.apply(this, arguments);
}
return _onClick;
}() // Method to retrieve WMS feature info asynchronously
}, {
key: "getWMSFeatureInfo",
value: function () {
var _getWMSFeatureInfo = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(x, y) {
var featureInfoXml, parsedAttributes;
return _regenerator["default"].wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.prev = 0;
if (!(this.deckLayerRef && typeof this.deckLayerRef.getFeatureInfoText === 'function')) {
_context2.next = 8;
break;
}
_context2.next = 4;
return this.deckLayerRef.getFeatureInfoText(x, y);
case 4:
featureInfoXml = _context2.sent;
if (!featureInfoXml) {
_context2.next = 8;
break;
}
// Parse the XML response to extract attributes
parsedAttributes = this.parseWMSFeatureInfo(featureInfoXml);
return _context2.abrupt("return", parsedAttributes.length > 0 ? parsedAttributes : null);
case 8:
return _context2.abrupt("return", null);
case 11:
_context2.prev = 11;
_context2.t0 = _context2["catch"](0);
console.warn('Failed to get WMS feature info:', _context2.t0);
return _context2.abrupt("return", null);
case 15:
case "end":
return _context2.stop();
}
}, _callee2, this, [[0, 11]]);
}));
function getWMSFeatureInfo(_x3, _x4) {
return _getWMSFeatureInfo.apply(this, arguments);
}
return getWMSFeatureInfo;
}() // Helper method to parse WMS XML response
}, {
key: "parseWMSFeatureInfo",
value: function parseWMSFeatureInfo(xmlString) {
try {
// Simple XML parsing to extract feature attributes
var parser = new DOMParser();
var xmlDoc = parser.parseFromString(xmlString, 'text/xml');
var attributes = [];
// Look for feature members
var featureMembers = xmlDoc.getElementsByTagName('gml:featureMember');
for (var i = 0; i < featureMembers.length; i++) {
var featureMember = featureMembers[i];
// Get all child elements that contain attribute data
var children = featureMember.children;
for (var j = 0; j < children.length; j++) {
var feature = children[j];
var featureChildren = feature.children;
// Extract attribute name-value pairs
for (var k = 0; k < featureChildren.length; k++) {
var attr = featureChildren[k];
var tagName = attr.tagName;
var value = attr.textContent || '';
// Clean up the tag name (remove namespace prefix)
var cleanName = tagName.includes(':') ? tagName.split(':')[1] : tagName;
// Skip empty values and geometry elements
if (value.trim() && !cleanName.toLowerCase().includes('geom')) {
attributes.push({
name: cleanName.replace(/_/g, ' ').toUpperCase(),
value: value.trim()
});
}
}
}
}
return attributes;
} catch (error) {
console.warn('Error parsing WMS feature info XML:', error);
return [];
}
}
}], [{
key: "findDefaultLayerProps",
value: function findDefaultLayerProps(dataset) {
var _dataset$metadata;
if (dataset.type !== _constants.DatasetType.WMS_TILE) {
return {
props: []
};
}
var _ref2 = dataset.metadata || {},
label = _ref2.label;
var props = {
label: label || 'WMS Layer',
layers: ((_dataset$metadata = dataset.metadata) === null || _dataset$metadata === void 0 ? void 0 : _dataset$metadata.layers) || []
};
return {
props: [props]
};
}
}]);
}(_abstractTileLayer["default"]);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY29tbW9uVXRpbHMiLCJyZXF1aXJlIiwiX2NvbnN0YW50cyIsIl9kZWNrZ2xMYXllcnMiLCJfdGlsZURhdGFzZXQiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwiX3dtc0xheWVySWNvbiIsIl9hYnN0cmFjdFRpbGVMYXllciIsIm93bktleXMiLCJlIiwiciIsInQiLCJPYmplY3QiLCJrZXlzIiw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