Skip to content

Commit

Permalink
Rename adaptive globe to globe-to-mercator (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
birkskyum authored Nov 4, 2024
1 parent 04ea68f commit d009e1d
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-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

0 comments on commit d009e1d

Please sign in to comment.