visgl / visgl/react-map-gl

freeze & crash following Map transformation [as of v7]

Open
#1,942 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
8.5k
Forks
1.4k
Avg merge
5d 17h
Merged PRs (30d)
3

Description

Description

My app requires a map within a div that is transformed using matrix3d CSS transformer.

Screen Shot 2022-08-04 at 10 55 03 AM

This was done before version 7 by transforming (matrix3d) a wrapping div around the map so that:

<div
      style={{
        transform:
          "matrix3d(0.7770456253, 0.0728373591, 0, 0.0000944713, -0.1763942931, 0.5033773233, 0, -0.0003884256, 0, 0, 1, 0, 136, 152, 0, 1)",
        height: "100vh"
      }}
    >
      <Map
        {...viewport}
        mapboxApiAccessToken={MAPBOX_TOKEN}
      />
    </div>

However, since version 7 the map object will freeze+crash the app, and the map itself will fail to load. Please see this in action in the attached CSB below.

Expected Behavior

Map can be transform3d as before.

Steps to Reproduce

Please reproduce issue below by changing from version 6 to 7
Screen Shot 2022-08-04 at 10 54 25 AM

https://codesandbox.io/s/mapbox-issues-with-matrix-transform-nctjvk?file=/src/index.js

Environment
  • Framework version:
  • Map library: DeckGL ^8, react-map-gl ^7
  • Browser:chrome/FF
  • OS: macOS
Logs

There are different logs, most of them from other comps that fail to render due the lag. Some logs show mapbox fails to load tiles, but this is not consistent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and compare its behavior when changing react-map-gl from v6 to v7, using the matrix3d-transformed wrapper and the browser logs. Determine whether the v7 change causes the freeze, crash, or tile-loading failure; done means the map loads and remains responsive under the same transform.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.