mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
chore(legacy-plugin-chart-map-box): replace viewport-mercator-project with @math.gl/web-mercator (#30651)
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user