Important Update from Mapbox for map crash bug fix‼️‼️‼️
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.5k
- Forks
- 1.4k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 3
Description
Description
I found a bug in MAPBOX maps that when you go all the way to the end in the TERRIN 3D map the map crashes.
MAPBOX released a version a few days ago with a bug fix and many other critical things
And I noticed that the update did not go into this project
I would be happy if we could add the fixes they made here too :)
The new version number they released is: v3.13.0
Expected Behavior
Once we implement the update, the map should stop crashing.
v3.13.0 [Latest] (https://github.com/mapbox/mapbox-gl-js/releases/latest)
Breaking changes ⚠️
interpolate expression will interpolate between non-alpha-premultiplied colors. The change might affect raster-particle-color, line-gradient, and heatmap-color.
rgb expression will return non-premultiplied-alpha color.
Features and improvements ✨
Add the ["worldview"] expression, which returns the current worldview of the map.
Add model-translation support for batched model layers.
Improve indoor level interaction.
Add support of gradient transforms in the fill style of vector icons.
Bug fixes 🐞
Fix querying and styling issues with multiple model layers referencing the same source.
Fix mapbox-gl-rtl-text v0.3.0 plugin not loading in certain configurations.
Fix icons with text-variable-anchor disappearing.
Fix minor distortions on vector icons in some cases.
Fix zooming over terrain with negative altitude values.
Fix interactions to not throw on mouseleave without mouseenter.
Fix shadow rendering issues on underground structures.
Fix striping artifacts when rendering shadows on some GPU configurations.
Fix errors when viewing a style with filtered model layers.
Fix parsing of color-use-theme property of 3D lights.
Fix feature-dependent config expressions (h/t @brncsk) https://github.com/mapbox/mapbox-gl-js/pull/13453.
Fix reset of the indoor floorplan selection after moving the camera.
Fix excessive rerendering of the map after setStyle with the same URL of an import.
Fix source reloading during mercator-globe transition with terrain.
Fix color of semi-transparent vector icons.
Steps to Reproduce
import React, { useState } from 'react';
import Map, { NavigationControl, Marker } from 'react-map-gl';
export default function MapboxMap() {
const [viewState, setViewState] = useState({
latitude: 32.096234,
longitude: 34.847722,
zoom: 10,
});
const handleMove = (evt) => {
const { latitude, longitude, zoom } = evt.viewState;
if (!isNaN(latitude) && !isNaN(longitude)) {
setViewState({ latitude, longitude, zoom });
}
};
return (
<div style={{ width: '100%', height: '100vh' }}>
<Map
reuseMaps={true}
{...viewState}
maxZoom={23}
style={{ width: '100%', height: '100%' }}
mapStyle={'mapbox://mapbox.mapbox-terrain-dem-v1'}
mapboxAccessToken={'YOUR_MAPBOX_TOKEN_HERE'}
onMove={handleMove}
>
{/* Add navigation controls */}
{/* Example marker */}
<Marker latitude={37.7749} longitude={-122.4194}>
<div
style={{
backgroundColor: '#ff0000',
width: '10px',
height: '10px',
borderRadius: '50%',
}}
/>
</Marker>
</Map>
</div>
);
}
go to 31.5912125604935, 35.400477859573904 try to zoom in all the way and play with the 3d position
Environment
- Framework version: react-map-gl 7.1.9
- Map library: mapbox-gl 2.15.0
- Browser: Chrom 138.0.7204.97
https://github.com/user-attachments/assets/fd1f82c1-a5e7-46de-bf97-ef4957958eff
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided reproduction using the Mapbox map at 31.5912125604935, 35.400477859573904, zooming fully into the 3D terrain, and compare the listed react-map-gl 7.1.9 and mapbox-gl 2.15.0 environment with Mapbox GL JS v3.13.0. Update the project’s Mapbox dependency as appropriate, then verify that the terrain interaction no longer crashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100