Skip to content

Commit

Permalink
bump mapbox-gl to v3 and remove attributio
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoEscaleira committed Jan 1, 2024
1 parent 2d70411 commit cf8dabd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@heroicons/react": "^2.1.1",
"graphql": "^16.8.1",
"mapbox-gl": "^2.15.0",
"mapbox-gl": "^3.0.1",
"next": "14.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
4 changes: 4 additions & 0 deletions src/app/globals.css → src/app/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ body {
height: 100vh;
background: rgb(var(--background-color));
}

.mapboxgl-ctrl-logo {
display: none !important;
}
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Metadata } from "next";
import { Roboto } from "next/font/google";
import { Footer, Header } from "@/components";
import "react-modal-global/styles/modal.scss";
import "./globals.css";
import "./globals.scss";

const roboto = Roboto({
weight: ["300", "400", "500", "700"],
Expand Down
5 changes: 2 additions & 3 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";
import Image from "next/image";
import Link from "next/link";
import { Map, MapProvider, NavigationControl } from "react-map-gl";
import { Map, MapProvider } from "react-map-gl";
import "mapbox-gl/dist/mapbox-gl.css";

export default function Home() {
Expand All @@ -10,6 +10,7 @@ export default function Home() {
<Map
id="quizMap"
mapboxAccessToken="pk.eyJ1IjoibWFyY29lc2NhbGVpcmFkbXUiLCJhIjoiY2xwN29ldHIwMG16bjJxbXJhZXc5dXUxOSJ9.ZP0gYeYBB-nL5py2RANUOw"
attributionControl={false}
initialViewState={{
longitude: 5,
latitude: 46,
Expand Down Expand Up @@ -42,8 +43,6 @@ export default function Home() {
</Link>
</div>
</section>

<NavigationControl position="bottom-right" showCompass />
</Map>
</MapProvider>
);
Expand Down
14 changes: 10 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,11 @@ chalk@^4.0.0:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

cheap-ruler@^3.0.1:
version "3.0.2"
resolved "https://registry.yarnpkg.com/cheap-ruler/-/cheap-ruler-3.0.2.tgz#60d2b3a0cb77a420472c8c5bb8f2c320fba4bb87"
integrity sha512-02T332h1/HTN6cDSufLP8x4JzDs2+VC+8qZ/N0kWIVPyc2xUkWwWh3B2fJxR7raXkL4Mq7k554mfuM9ofv/vGg==

"chokidar@>=3.0.0 <4.0.0", chokidar@^3.5.3:
version "3.5.3"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
Expand Down Expand Up @@ -1991,10 +1996,10 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"

mapbox-gl@^2.15.0:
version "2.15.0"
resolved "https://registry.yarnpkg.com/mapbox-gl/-/mapbox-gl-2.15.0.tgz#9439828d0bae1e7b464ae08b30cb2e65a7e2256d"
integrity sha512-fjv+aYrd5TIHiL7wRa+W7KjtUqKWziJMZUkK5hm8TvJ3OLeNPx4NmW/DgfYhd/jHej8wWL+QJBDbdMMAKvNC0A==
mapbox-gl@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/mapbox-gl/-/mapbox-gl-3.0.1.tgz#1ab68cee520d727b495b94889d2137f2a8c9cde1"
integrity sha512-o7C6sAlj6Hkdd4xQVEgQflgJYNYyZOAtYahhIOb9m8chI8umtWcCp8Ie0iGLYJvce1WHRMa3WGzs69ggwuWlDA==
dependencies:
"@mapbox/geojson-rewind" "^0.5.2"
"@mapbox/jsonlint-lines-primitives" "^2.0.2"
Expand All @@ -2004,6 +2009,7 @@ mapbox-gl@^2.15.0:
"@mapbox/unitbezier" "^0.0.1"
"@mapbox/vector-tile" "^1.3.1"
"@mapbox/whoots-js" "^3.1.0"
cheap-ruler "^3.0.1"
csscolorparser "~1.0.3"
earcut "^2.2.4"
geojson-vt "^3.2.1"
Expand Down

0 comments on commit cf8dabd

Please sign in to comment.