Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade react-map-gl and maplibre-gl in examples #9394

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/experimental/h3-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
"dependencies": {
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/get-started/pure-js/carto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0"
"maplibre-gl": "^5.0.0"
},
"devDependencies": {
"vite": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/get-started/pure-js/maplibre-globe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@deck.gl/core": "^9.0.0",
"@deck.gl/layers": "^9.0.0",
"@deck.gl/mapbox": "^9.0.0",
"maplibre-gl": "5.0.0-pre.9"
"maplibre-gl": "^5.0.0"
},
"devDependencies": {
"vite": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/get-started/pure-js/maplibre/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@deck.gl/core": "^9.0.0",
"@deck.gl/layers": "^9.0.0",
"@deck.gl/mapbox": "^9.0.0",
"maplibre-gl": "^3.0.0"
"maplibre-gl": "^5.0.0"
},
"devDependencies": {
"vite": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/get-started/react/mapbox/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import React, {useState} from 'react';
import {createRoot} from 'react-dom/client';
import {Map, NavigationControl, Popup, useControl} from 'react-map-gl';
import {Map, NavigationControl, Popup, useControl} from 'react-map-gl/mapbox';
import {GeoJsonLayer, ArcLayer} from 'deck.gl';
import {MapboxOverlay as DeckOverlay} from '@deck.gl/mapbox';
import 'mapbox-gl/dist/mapbox-gl.css';
Expand Down
2 changes: 1 addition & 1 deletion examples/get-started/react/mapbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"mapbox-gl": "^3.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"vite": "^4.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/get-started/react/maplibre/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
"dependencies": {
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"vite": "^4.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/layer-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"d3-scale": "^3.1.0",
"extrude-polyline": "^1.0.6",
"h3-js": "^4.1.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-autobind": "^1.0.6",
"react-dom": "^18.2.0",
"react-map-gl": "^7.1.0",
"react-map-gl": "^8.0.0",
"react-stats-zavatta": "^0.0.6"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"@luma.gl/constants": "^9.1.0-beta.16",
"brace": "^0.11.1",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-ace": "^6.1.4",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0",
"react-map-gl": "^8.0.0",
"react-virtualized-auto-sizer": "^1.0.2"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions examples/playground/src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import React, {Component, Fragment} from 'react';
import {createRoot} from 'react-dom/client';
import AutoSizer from 'react-virtualized-auto-sizer';
import {Map} from 'react-map-gl';
import DeckWithMapboxMaps from './deck-with-mapbox-maps';
import {Map} from 'react-map-gl/maplibre';
import DeckWithMapLibre from './deck-with-maplibre';
import DeckWithGoogleMaps from './deck-with-google-maps';

import {FlyToInterpolator} from '@deck.gl/core';
Expand Down Expand Up @@ -169,7 +169,7 @@ export default class App extends Component {
);
} else {
deckMap = (
<DeckWithMapboxMaps
<DeckWithMapLibre
id="json-deck"
{...jsonProps}
initialViewState={initialViewState}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import DeckGL from '@deck.gl/react';
import {View} from '@deck.gl/core';
import maplibregl from 'maplibre-gl';

export default class DeckWithMapboxMaps extends Component {
export default class DeckWithMapLibre extends Component {
render() {
const {views = []} = this.props;

Expand All @@ -16,12 +16,7 @@ export default class DeckWithMapboxMaps extends Component {
if (view.props.map || view.props.mapStyle) {
maps.push(
<View id={view.props.id} key={view.props.id}>
<this.props.Map
reuseMap
mapLib={maplibregl}
mapStyle={view.props.mapStyle}
mapboxApiAccessToken={view.props.mapToken || this.props.mapboxApiAccessToken}
/>
<this.props.Map reuseMaps mapLib={maplibregl} mapStyle={view.props.mapStyle} />
</View>
);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/website/3d-heatmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/3d-tiles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"@types/react-dom": "^18.0.0",
"@loaders.gl/3d-tiles": "^4.2.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/arc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@types/react-dom": "^18.0.0",
"d3-scale": "^4.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/brushing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@types/react-dom": "^18.0.0",
"d3-scale": "^4.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/carto-sql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
},
"dependencies": {
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/collision-filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"deck.gl": "^9.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"maplibre-gl": "^3.0.0",
"react-map-gl": "^7.1.0"
"maplibre-gl": "^5.0.0",
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/contour/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/data-filter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/geojson/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@types/react-dom": "^18.0.0",
"d3-scale": "^4.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/heatmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/highway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@types/react-dom": "^18.0.0",
"d3-scale": "^4.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/website/i3s/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"dependencies": {
"@loaders.gl/i3s": "^4.2.0",
"maplibre-gl": "^3.0.0",
"react-map-gl": "^7.1.0",
"maplibre-gl": "^5.0.0",
"react-map-gl": "^8.0.0",
"deck.gl": "^9.0.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/website/icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0",
"react-map-gl": "^8.0.0",
"supercluster": "^8.0.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/website/line/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/mapbox/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {scaleLog} from 'd3-scale';
import {cellToLatLng} from 'h3-js';
import {load} from '@loaders.gl/core';
import {CSVLoader} from '@loaders.gl/csv';
import {Map, NavigationControl, useControl, Layer} from 'react-map-gl';
import {Map, NavigationControl, useControl, Layer} from 'react-map-gl/mapbox';
import 'mapbox-gl/dist/mapbox-gl.css';

const DATA_URL =
Expand Down
2 changes: 1 addition & 1 deletion examples/website/mapbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"mapbox-gl": "^3.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
9 changes: 3 additions & 6 deletions examples/website/maplibre/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

import React from 'react';
import {useState, useCallback, useEffect} from 'react';
// TODO remove alias from package.json once v5 available via react-map-gl
import maplibregl from 'maplibre-gl-v5/dist/maplibre-gl-dev';
import 'maplibre-gl-v5/dist/maplibre-gl.css';
import {Map, useControl, useMap} from '@vis.gl/react-maplibre';
import type {ViewState} from '@vis.gl/react-maplibre';
import 'maplibre-gl/dist/maplibre-gl.css';
import {Map, useControl, useMap} from 'react-map-gl/maplibre';
import type {ViewState} from 'react-map-gl/maplibre';
import {MapboxOverlay as DeckOverlay} from '@deck.gl/mapbox';

import {createRoot} from 'react-dom/client';
Expand Down Expand Up @@ -112,7 +110,6 @@ export default function App({
>
<Map
reuseMaps
mapLib={maplibregl}
projection="globe"
id="map"
initialViewState={INITIAL_VIEW_STATE}
Expand Down
5 changes: 2 additions & 3 deletions examples/website/maplibre/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl-v5": "npm:maplibre-gl@^5.0.1",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"@vis.gl/react-maplibre": "^1.0.0-alpha.5"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/maplibre/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "es2020",
"jsx": "react",
"moduleResolution": "node",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
}
}
4 changes: 2 additions & 2 deletions examples/website/mask-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"deck.gl": "^9.0.0",
"maplibre-gl": "^3.0.0",
"maplibre-gl": "^5.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0"
"react-map-gl": "^8.0.0"
},
"devDependencies": {
"typescript": "^4.6.0",
Expand Down
Loading
Loading