Skip to content

Commit

Permalink
chore(legacy-plugin-chart-map-box): replace viewport-mercator-project…
Browse files Browse the repository at this point in the history
… with @math.gl/web-mercator (apache#30651)
  • Loading branch information
birkskyum authored Nov 24, 2024
1 parent 33a9817 commit e9e2c0b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 23 deletions.
68 changes: 49 additions & 19 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"lib"
],
"dependencies": {
"@math.gl/web-mercator": "^4.1.0",
"prop-types": "^15.8.1",
"react-map-gl": "^6.1.19",
"supercluster": "^8.0.1",
"viewport-mercator-project": "^6.1.1"
"supercluster": "^8.0.1"
},
"peerDependencies": {
"@superset-ui/chart-controls": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import { Component } from 'react';
import PropTypes from 'prop-types';
import MapGL from 'react-map-gl';
import ViewportMercator from 'viewport-mercator-project';
import { WebMercatorViewport } from '@math.gl/web-mercator';
import ScatterPlotGlowOverlay from './ScatterPlotGlowOverlay';
import './MapBox.css';

Expand Down Expand Up @@ -63,7 +63,7 @@ class MapBox extends Component {
// Get a viewport that fits the given bounds, which all marks to be clustered.
// Derive lat, lon and zoom from this viewport. This is only done on initial
// render as the bounds don't update as we pan/zoom in the current design.
const mercator = new ViewportMercator({
const mercator = new WebMercatorViewport({
width,
height,
}).fitBounds(bounds);
Expand Down

0 comments on commit e9e2c0b

Please sign in to comment.