UNPKG

@grafana/ui

Version:
27 lines (24 loc) 605 B
import { css } from '@emotion/css'; import WKT from 'ol/format/WKT'; import { Geometry } from 'ol/geom'; "use strict"; 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