summaryrefslogtreecommitdiff
path: root/scripts/style-spec.js
blob: fc16849de06df116e7744643ee77d19334d66b89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
const referenceSpec = require('../mapbox-gl-js/src/style-spec/reference/v8');

referenceSpec.layer.type.values["location-indicator"] = {};
referenceSpec["layout_location-indicator"] = {
    "top-image": {
        "type": "resolvedImage",
        "property-type": "data-constant",
        "expression": {
            "interpolated": false,
            "parameters": [
                "zoom"
            ]
        },
        "doc": "Name of image in sprite to use as the top of the location indicator."
    },
    "bearing-image": {
        "type": "resolvedImage",
        "property-type": "data-constant",
        "expression": {
            "interpolated": false,
            "parameters": [
                "zoom"
            ]
        },
        "doc": "Name of image in sprite to use as the middle of the location indicator."
    },
    "shadow-image": {
        "type": "resolvedImage",
        "property-type": "data-constant",
        "expression": {
            "interpolated": false,
            "parameters": [
                "zoom"
            ]
        },
        "doc": "Name of image in sprite to use as the background of the location indicator."
    }
};

referenceSpec["paint_location-indicator"] = {
    "perspective-compensation": {
        "type": "number",
        "default": "0.85",
        "property-type": "data-constant",
        "expression": {
            "interpolated": true,
            "parameters": [
                "zoom"
            ]
        },
        "doc": "The amount of the perspective compensation, between 0 and 1. A value of 1 produces a location indicator of constant width across the screen. A value of 0 makes it scale naturally according to the viewing projection."
    },
    "image-tilt-displacement": {
        "type": "number",
        "property-type": "data-constant",
        "default": "0",
        "units": "pixels",
        "expression": {
            "interpolated": true,
            "parameters": [
                "zoom"
            ]
        },
        "doc": "The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence."
    },
    "bearing": {
        "type": "number",
        "default": "0",
        "default": 0,
        "period": 360,
        "units": "degrees",
        "property-type": "data-constant",
        "expression": {
            "interpolated": false,
            "parameters": [ ]
        },
        "transition": true,
        "doc": "The bearing of the location indicator."
    },
    "location": {
        "type": "array",
        "default": [
            0.0,
            0.0,
            0.0
        ],
        "length": 3,
        "value": "number",
        "property-type": "data-constant",
        "expression": {
            "interpolated": true,
            "parameters": []
        },
        "transition": true,
        "doc": "An array of [latitude, longitude, altitude] position of the location indicator."
    },
    "accuracy-radius": {
        "type": "number",
        "units": "meters",
        "default": 0,
        "property-type": "data-constant",
        "expression": {
            "interpolated": true,
            "parameters": [
                "zoom"
            ]
        },
        "transition": true,
        "doc": "The accuracy, in meters, of the position source used to retrieve the position of the location indicator."
    },
    "top-image-size": {
        "type": "number",
        "units": "factor of the original icon size",
        "property-type": "data-constant",
        "default": 1,
        "expression": {
            "interpolated": true,
            "parameters": [
                "zoom"
            ]
        },
        "transition": true,
        "doc": "The size of the top image, as a scale factor applied to the size of the specified image."
    },
    "bearing-image-size": {
        "type": "number",
        "units": "factor of the original icon size",
        "property-type": "data-constant",
        "default": 1,
        "expression": {
            "interpolated": true,
            "parameters": [
                "zoom"
            ]
        },
        "transition": true,
        "doc": "The size of the bearing image, as a scale factor applied to the size of the specified image."
    },
    "shadow-image-size": {
        "type": "number",
        "units": "factor of the original icon size",
        "property-type": "data-constant",
        "default": 1,
        "expression": {
            "interpolated": true,
            "parameters": [
                "zoom"
            ]
        },
        "transition": true,
        "doc": "The size of the shadow image, as a scale factor applied to the size of the specified image."
    },
    "accuracy-radius-color": {
        "type": "color",
        "property-type": "data-constant",
        "default": "#ffffff",
        "expression": {
            "interpolated": true,
            "parameters": [
                "zoom"
            ]
        },
        "transition": true,
        "doc": "The color for drawing the accuracy radius, as a circle. To adjust transparency, set the alpha component of the color accordingly."

    },
    "accuracy-radius-border-color": {
        "type": "color",
        "property-type": "data-constant",
        "default": "#ffffff",
        "expression": {
            "interpolated": true,
            "parameters": [
                "zoom"
            ]
        },
        "transition": true,
        "doc": "The color for drawing the accuracy radius border. To adjust transparency, set the alpha component of the color accordingly."
    },
    "bearing": {
        "type": "number",
        "default": "0",
        "default": 0,
        "period": 360,
        "units": "degrees",
        "property-type": "data-constant",
        "expression": {
            "interpolated": false,
            "parameters": [ ]
        },
        "transition": false,
        "doc": "The bearing of the location indicator."
    }
};

var spec = module.exports = referenceSpec