The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Remove obsolete LeafletHeatMap and leaflet.heat (#70301)
Jakub Chodorowicz5274ca8dcb70
diff --git a/bun.lock b/bun.lockindex 243cbe00a55..ce2329bd836 100644--- a/bun.lock+++ b/bun.lock@@ -116,7 +116,6 @@"kbar": "0.1.0-beta.45","leaflet": "^1.2.0","leaflet-draw": "^0.4.9",- "leaflet.heat": "^0.2.0","lodash.debounce": "^4.0.8","lodash.orderby": "^4.6.0","merge-refs": "^1.3.0",@@ -3669,8 +3668,6 @@"leaflet-draw": ["[email protected]", "", {}, "sha512-O99KSPjyHNMDE+uD/fpdPydvQfTE8QruaG7ylEEtKCIaSSb60mCWoDdGUqGEHU9PGPu2JxbEfkGTXY9eYv7aEw=="],- "leaflet.heat": ["[email protected]", "", {}, "sha1-EJ2M9Ybwre5B8Fr/Ax4np3/swik="],-"less": ["[email protected]", "", { "dependencies": { "copy-anything": "^2.0.1", "parse-node-version": "^1.0.1", "tslib": "^2.3.0" }, "optionalDependencies": { "errno": "^0.1.1", "graceful-fs": "^4.1.2", "image-size": "~0.5.0", "make-dir": "^2.1.0", "mime": "^1.4.1", "needle": "^3.1.0", "source-map": "~0.6.0" }, "bin": { "lessc": "bin/lessc" } }, "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg=="],"leven": ["[email protected]", "", {}, "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A=="],diff --git a/frontend/src/metabase/visualizations/components/LeafletHeatMap.jsx b/frontend/src/metabase/visualizations/components/LeafletHeatMap.jsxdeleted file mode 100644index 76a12a66dd5..00000000000--- a/frontend/src/metabase/visualizations/components/LeafletHeatMap.jsx+++ /dev/null@@ -1,40 +0,0 @@-import L from "leaflet";--import { LeafletMap } from "./LeafletMap";--import "leaflet.heat";--export class LeafletHeatMap extends LeafletMap {- componentDidMount() {- super.componentDidMount();-- // Leaflet map may not be fully initialized- // https://stackoverflow.com/a/28903337/113- setTimeout(() => {- this.pinMarkerLayer = L.layerGroup([]).addTo(this.map);- this.heatLayer = L.heatLayer([], { radius: 25 }).addTo(this.map);- this.componentDidUpdate({}, {});- });- }-- componentDidUpdate(prevProps, prevState) {- super.componentDidUpdate(prevProps, prevState);-- try {- const { heatLayer } = this;- const { points, max, settings } = this.props;-- heatLayer.setOptions({- max: max,- maxZoom: settings["map.heat.max-zoom"],- minOpacity: settings["map.heat.min-opacity"],- radius: settings["map.heat.radius"],- blur: settings["map.heat.blur"],- });- heatLayer.setLatLngs(points);- } catch (err) {- console.error(err);- this.props.onRenderError(err.message || err);- }- }-}diff --git a/frontend/src/metabase/visualizations/components/PinMap.jsx b/frontend/src/metabase/visualizations/components/PinMap.jsxindex a38465cd321..b846d8037eb 100644--- a/frontend/src/metabase/visualizations/components/PinMap.jsx+++ b/frontend/src/metabase/visualizations/components/PinMap.jsx@@ -13,7 +13,6 @@ import { LatitudeLongitudeError } from "metabase/visualizations/lib/errors";import { hasLatitudeAndLongitudeColumns } from "metabase-lib/v1/types/utils/isa";import { LeafletGridHeatMap } from "./LeafletGridHeatMap";-import { LeafletHeatMap } from "./LeafletHeatMap";import { LeafletMarkerPinMap } from "./LeafletMarkerPinMap";import { LeafletTilePinMap } from "./LeafletTilePinMap";import S from "./PinMap.module.css";@@ -26,7 +25,6 @@ const WORLD_BOUNDS = [const MAP_COMPONENTS_BY_TYPE = {markers: LeafletMarkerPinMap,tiles: LeafletTilePinMap,- heat: LeafletHeatMap,grid: LeafletGridHeatMap,};diff --git a/frontend/src/metabase/visualizations/visualizations/Map/Map.jsx b/frontend/src/metabase/visualizations/visualizations/Map/Map.jsxindex 8918d1247ef..876cb5b3539 100644--- a/frontend/src/metabase/visualizations/visualizations/Map/Map.jsx+++ b/frontend/src/metabase/visualizations/visualizations/Map/Map.jsx@@ -81,8 +81,6 @@ export class Map extends Component {},value: "pin",},- // NOTE tlrobinson 4/13/18: Heat maps disabled until we can compute leaflet-heat options better- // { name: "Heat map", value: "heat" },{ name: "Grid map", value: "grid" },],},@@ -108,9 +106,6 @@ export class Map extends Component {longitudeColumn.binning_info) {return "grid";- // NOTE tlrobinson 4/13/18: Heat maps disabled until we can compute leaflet-heat options better- // } else if (settings["map.metric_column"]) {- // return "heat";} else {return "pin";}@@ -144,8 +139,6 @@ export class Map extends Component {},value: "markers",},- // NOTE tlrobinson 4/13/18: Heat maps disabled until we can compute leaflet-heat options better- // { name: "Heat", value: "heat" },{ name: "Grid", value: "grid" },],},diff --git a/package.json b/package.jsonindex cebae38519d..68d811eb9ec 100644--- a/package.json+++ b/package.json@@ -121,7 +121,6 @@"kbar": "0.1.0-beta.45","leaflet": "^1.2.0","leaflet-draw": "^0.4.9",- "leaflet.heat": "^0.2.0","lodash.debounce": "^4.0.8","lodash.orderby": "^4.6.0","merge-refs": "^1.3.0",