Skip to content

Commit

Permalink
Rename adaptive globe from globe to globe-mercator
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum committed Nov 4, 2024
1 parent 04ea68f commit 4085cd4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 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
- Rename adaptive globe from `globe` to `globe-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-mercator'
}
} as StyleSpecification)).toEqual([
{command: 'setProjection', args: [{type: 'globe'}]},
{command: 'setProjection', args: [{type: 'globe-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-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-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-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-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-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

0 comments on commit 4085cd4

Please sign in to comment.