|
1 | 1 | import { Type } from '@sinclair/typebox'; |
2 | 2 |
|
| 3 | +/** |
| 4 | + * Type Schema for Basemap Map Source Configuration |
| 5 | + * Compatible with Mobile Atlas Creator (MOBAC) Custom XML Map Sources |
| 6 | + * @link https://mobac.sourceforge.io/wiki/index.php/Custom_XML_Map_Sources |
| 7 | + */ |
| 8 | + |
3 | 9 | export const BasemapMapSource = Type.Object({ |
4 | 10 | name: Type.Object({ |
5 | 11 | _text: Type.String() |
6 | | - }), |
| 12 | + }, { description: 'The name of the map source' }), |
7 | 13 | minZoom: Type.Object({ |
8 | 14 | _text: Type.Integer() |
9 | | - }), |
| 15 | + }, { description: 'The minimum zoom level provided by the map source' }), |
10 | 16 | maxZoom: Type.Object({ |
11 | 17 | _text: Type.Integer() |
12 | | - }), |
| 18 | + }, { description: 'The maximum zoom level provided by the map source' }), |
13 | 19 | tileType: Type.Object({ |
14 | 20 | _text: Type.String() |
15 | | - }), |
| 21 | + }, { description: 'The image type provided by the map source' }), |
16 | 22 | tileUpdate: Type.Optional(Type.Object({ |
17 | 23 | _text: Type.String({ |
18 | 24 | default: 'None' |
19 | 25 | }) |
20 | | - })), |
| 26 | + }, { description: 'The server capabilities for conditional downloading of new/updated tiles' })), |
21 | 27 | url: Type.Optional(Type.Object({ |
22 | 28 | _text: Type.String() |
23 | | - })), |
| 29 | + }, { description: 'The URL for the tiles of the map source' })), |
| 30 | + invertYCoordinate: Type.Optional(Type.Object({ |
| 31 | + _text: Type.String() |
| 32 | + }, { description: 'Inverts the y coordinate so that it starts south' })), |
24 | 33 | backgroundColor: Type.Optional(Type.Object({ |
25 | 34 | _text: Type.String() |
26 | | - })), |
| 35 | + }, { description: 'The background color of a map' })), |
| 36 | + ignoreErrors: Type.Optional(Type.Object({ |
| 37 | + _text: Type.Boolean() |
| 38 | + }, { description: 'Handling of missing tiles' })), |
| 39 | + serverParts: Type.Optional(Type.Object({ |
| 40 | + _text: Type.Optional(Type.String()) |
| 41 | + }, { description: 'Use multiple servers for the map source' })) |
27 | 42 | }) |
28 | 43 |
|
29 | 44 | export default Type.Object({ |
|
0 commit comments