我在 react 中使用 Mapbox 和 D3 做天气
我使用 Mapbox fly 来包含像这样的填充
map.current.flyTo({
center: bounds.getCenter(),
zoom,
essential: true,
padding: { top: 200, bottom: 100, left: 50, right: 50 },
duration: 2000,
});
使用后获取地图绑定大小
map.current.getBounds();
和d3这样画
我该如何解决?
删除填充并设置填充值包括d3