Skip to content

Commit a90dd74

Browse files
committed
Make globe a spherical projection
1 parent 90fdb88 commit a90dd74

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

CHANGELOG.md

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

33
### ✨ Features and improvements
4-
- Rename adaptive globe from `globe` to `globe-to-mercator` ([#878](https://github.com/maplibre/maplibre-style-spec/pull/878))
5-
- Add non-adaptive `globe` ([#878](https://github.com/maplibre/maplibre-style-spec/pull/878))
64
- _...Add new stuff here..._
75

86
### 🐞 Bug fixes

src/diff.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,10 +607,10 @@ describe('diff', () => {
607607
} as StyleSpecification,
608608
{
609609
projection: {
610-
type: 'globe-to-mercator'
610+
type: 'globe'
611611
}
612612
} as StyleSpecification)).toEqual([
613-
{command: 'setProjection', args: [{type: 'globe-to-mercator'}]},
613+
{command: 'setProjection', args: [{type: 'globe'}]},
614614
]);
615615
});
616616
});

src/reference/v8.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"type": "projection",
130130
"doc": "The projection configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.",
131131
"example": {
132-
"type": "globe-to-mercator"
132+
"type": "mercator"
133133
}
134134
},
135135
"terrain": {
@@ -4538,7 +4538,7 @@
45384538
]
45394539
},
45404540
"transition": true,
4541-
"doc": "How to blend the atmosphere. Where 1 is visible atmosphere and 0 is hidden. It is best to interpolate this expression when using globe-to-mercator projection."
4541+
"doc": "How to blend the atmosphere. Where 1 is visible atmosphere and 0 is hidden. It is best to interpolate this expression when using globe projection."
45424542
}
45434543
},
45444544
"terrain": {
@@ -4579,9 +4579,6 @@
45794579
},
45804580
"globe": {
45814581
"doc": "Spherical projection."
4582-
},
4583-
"globe-to-mercator": {
4584-
"doc": "Spherical projection with zoom transition to Web Mercator projection."
45854582
}
45864583
}
45874584
}

src/validate/validate_projection.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ 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, globe-to-mercator], 1 found');
29+
expect(errors[0].message).toBe('type: expected one of [mercator, globe], 1 found');
3030
});
3131

3232
test('Should pass if everything is according to spec', () => {
33-
let errors = validateProjection({validateSpec, value: {type: 'globe-to-mercator'}, styleSpec: v8, style: {} as any});
33+
let errors = validateProjection({validateSpec, value: {type: 'globe'}, styleSpec: v8, style: {} as any});
3434
expect(errors).toHaveLength(0);
3535
errors = validateProjection({validateSpec, value: {type: 'mercator'}, styleSpec: v8, style: {} as any});
3636
expect(errors).toHaveLength(0);

0 commit comments

Comments
 (0)