@grafana/ui
Version:
Grafana Components Library
27 lines (24 loc) • 605 B
JavaScript
import { css } from '@emotion/css';
import WKT from 'ol/format/WKT';
import { Geometry } from 'ol/geom';
;
function GeoCell({ value }) {
let disp = null;
if (value instanceof Geometry) {
disp = new WKT().writeGeometry(value, {
featureProjection: "EPSG:3857",
dataProjection: "EPSG:4326"
});
} else if (value != null) {
disp = `${value}`;
}
return disp;
}
const getStyles = () => css({
fontFamily: "monospace",
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis"
});
export { GeoCell, getStyles };
//# sourceMappingURL=GeoCell.mjs.map