Skip to content

Commit

Permalink
Add general-perspective projection. Clarify that globe is an adap…
Browse files Browse the repository at this point in the history
…tive transition from General Perspective to Mercator. (#890)

* add stereographic projection

* changelog

* changelog

* globe doc

* general-perspective
  • Loading branch information
birkskyum authored Nov 7, 2024
1 parent 5788145 commit d7444b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## main

### ✨ Features and improvements
Add `general-perspective` projection ([#890](https://github.com/maplibre/maplibre-style-spec/pull/890))
- _...Add new stuff here..._

### 🐞 Bug fixes
Expand Down
7 changes: 5 additions & 2 deletions src/reference/v8.json
Original file line number Diff line number Diff line change
Expand Up @@ -4575,10 +4575,13 @@
"default": "mercator",
"values": {
"mercator": {
"doc": "The Mercator projection."
"doc": "Web Mercator projection."
},
"globe": {
"doc": "The globe projection."
"doc": "Globe projection. Zoom transition from General Perspective projection to Web Mercator projection."
},
"general-perspective": {
"doc": "General Perspective projection."
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/validate/validate_projection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('Validate projection', () => {
test('Should return errors according to spec violations', () => {
const errors = validateProjection({validateSpec, value: {type: 1 as any}, styleSpec: v8, style: {} as any});
expect(errors).toHaveLength(1);
expect(errors[0].message).toBe('type: expected one of [mercator, globe], 1 found');
expect(errors[0].message).toBe('type: expected one of [mercator, globe, general-perspective], 1 found');
});

test('Should pass if everything is according to spec', () => {
Expand Down

0 comments on commit d7444b4

Please sign in to comment.