Skip to content

Commit d7444b4

Browse files
authored
Add general-perspective projection. Clarify that globe is an adaptive transition from General Perspective to Mercator. (#890)
* add stereographic projection * changelog * changelog * globe doc * general-perspective
1 parent 5788145 commit d7444b4

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## main
22

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

67
### 🐞 Bug fixes

src/reference/v8.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4575,10 +4575,13 @@
45754575
"default": "mercator",
45764576
"values": {
45774577
"mercator": {
4578-
"doc": "The Mercator projection."
4578+
"doc": "Web Mercator projection."
45794579
},
45804580
"globe": {
4581-
"doc": "The globe projection."
4581+
"doc": "Globe projection. Zoom transition from General Perspective projection to Web Mercator projection."
4582+
},
4583+
"general-perspective": {
4584+
"doc": "General Perspective projection."
45824585
}
45834586
}
45844587
}

src/validate/validate_projection.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('Validate projection', () => {
2626
test('Should return errors according to spec violations', () => {
2727
const errors = validateProjection({validateSpec, value: {type: 1 as any}, styleSpec: v8, style: {} as any});
2828
expect(errors).toHaveLength(1);
29-
expect(errors[0].message).toBe('type: expected one of [mercator, globe], 1 found');
29+
expect(errors[0].message).toBe('type: expected one of [mercator, globe, general-perspective], 1 found');
3030
});
3131

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

0 commit comments

Comments
 (0)