Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename adaptive globe to globe-to-mercator #878

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
- Rename adaptive globe from `globe` to `globe-to-mercator` ([#878](https://github.com/maplibre/maplibre-style-spec/pull/878))
- _...Add new stuff here..._

### 🐞 Bug fixes
Expand Down
4 changes: 2 additions & 2 deletions src/diff.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -607,10 +607,10 @@ describe('diff', () => {
} as StyleSpecification,
{
projection: {
type: 'globe'
type: 'globe-to-mercator'
}
} as StyleSpecification)).toEqual([
{command: 'setProjection', args: [{type: 'globe'}]},
{command: 'setProjection', args: [{type: 'globe-to-mercator'}]},
]);
});
});
10 changes: 5 additions & 5 deletions src/reference/v8.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"type": "projection",
"doc": "The projection configuration. **Note:** this definition is still experimental and is under development in maplibre-gl-js.",
"example": {
"type": "globe"
"type": "globe-to-mercator"
}
},
"terrain": {
Expand Down Expand Up @@ -4538,7 +4538,7 @@
]
},
"transition": true,
"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."
"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."
}
},
"terrain": {
Expand Down Expand Up @@ -4575,10 +4575,10 @@
"default": "mercator",
"values": {
"mercator": {
"doc": "The Mercator projection."
"doc": "Web Mercator projection."
},
"globe": {
"doc": "The globe projection."
"globe-to-mercator": {
"doc": "Spherical projection with zoom transition to Web Mercator projection."
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/validate/validate_projection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ 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-to-mercator], 1 found');
});

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