mapbox / mapbox/mapbox-gl-js

Heat Map is rendered offset from intended coordinates on iOS

Open
#6,915 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle: environment-specific :desktop_computer: needs investigation :mag:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 0.46.0

**browser**: iOS Safari

### Steps to Trigger Behavior

1. Build a map w/ a heat map layer
2. Set a viewport that is much larger than `device-width`
3. Open in iOS safari

### Link to Demonstration

- [live use case](https://www.boltline.org/?geo=-114.00779570095528,36.65656847675746,17.371787466020198,0.5257934009966903)
- [gist source](https://gist.github.com/mike-marcacci/8b426afeb8cc809cd122afcd391930a6) - note that I couldn't use JSBin/JSFiddle since they mess with viewport
- [gist result](https://rawgit.com/mike-marcacci/8b426afeb8cc809cd122afcd391930a6/raw/0e7b594aa5194070e381d372f75c3e65a2ea03ba/index.html) - open this in iOS

### Expected Behavior
The heat map should appear around the data points.

### Actual Behavior
The heat map is shifted up and left of the data points, proportional to its distance from screen point `0,0`:

![img_0992](https://user-images.githubusercontent.com/690517/42294218-707fac1c-7f9c-11e8-90d7-8cab38a01ede.png)

![img_0991](https://user-images.githubusercontent.com/690517/42294222-72b5bd8c-7f9c-11e8-8726-4250b8330752.png)

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 by reproducing the issue from the linked live use case or gist result in iOS Safari, using a heat map layer and a viewport larger than device-width. Compare the heat map position with its data points and investigate the coordinate handling; done means the heat map remains aligned with the data points on iOS Safari.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.