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(examples) Add interleaved mapbox-overlay to gallery #8556

Merged
merged 15 commits into from Mar 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 8 additions & 9 deletions examples/gallery/src/mapbox-layer.html
@@ -1,10 +1,11 @@
<html>
<head>
<title>Interleaving deck.gl with Mapbox Layers</title>
<script src="https://unpkg.com/deck.gl@^8.8.0/dist.min.js"></script>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.js"></script>
<title>Interleaving deck.gl with Mapbox Layers using MapboxLayer</title>

<script src="https://unpkg.com/deck.gl@^9.0.0-beta.5/dist.min.js"></script>
<script src="https://unpkg.com/maplibre-gl@^3.0.0/dist/maplibre-gl.js"></script>

<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.css" rel="stylesheet" />
<link href="https://unpkg.com/maplibre-gl@^3.0.0/dist/maplibre-gl.css" rel="stylesheet" />
</head>

<body style="margin:0"></body>
Expand All @@ -13,11 +14,9 @@

const {MapboxLayer, ScatterplotLayer, ArcLayer} = deck;

mapboxgl.accessToken = '<mapbox-access-token>';

const map = new mapboxgl.Map({
const map = new maplibregl.Map({
container: document.body,
style: 'mapbox://styles/mapbox/light-v9',
style: 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json',
center: [-122.4, 37.79],
zoom: 15,
pitch: 60
Expand All @@ -28,7 +27,7 @@

map.addLayer({
'id': '3d-buildings',
'source': 'composite',
'source': 'carto',
'source-layer': 'building',
'filter': ['==', 'extrude', 'true'],
'type': 'fill-extrusion',
Expand Down