mapbox / mapbox/mapbox-gl-js

Design better format for setting & getting map bounds

Open
#2,112 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

breaking change :warning: feature :green_apple: needs discussion :speech_balloon:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

LngLatBounds can currently represent an axis-aligned rectangular bounding box. When the map is rotated or tilted this doesn't fit the current view exactly.

Should switch LngLatBounds to storing four locations so that it can represent skewed and rotated bounding boxes?

We could it make it backwards compatible by making the constructor accept only two points.

cc @mourner

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 reading the LngLatBounds implementation and its current constructor and accessors. Define how four locations would represent rotated or tilted views while preserving construction from two points; done when the API and compatibility behavior are specified and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.