Mapbox » History » Version 3
Philippe May, 17/07/2018 18:01
1 | 1 | Philippe May | h1. Mapbox |
---|---|---|---|
2 | 1 | Philippe May | |
3 | 1 | Philippe May | Gisaf uses mapbox-gl for rendering online maps. |
4 | 1 | Philippe May | |
5 | 1 | Philippe May | |
6 | 2 | Philippe May | h2. Setting styles for the layers (models) |
7 | 1 | Philippe May | |
8 | 1 | Philippe May | There are 2 places where mapbox styles live, depending on the type of layer. |
9 | 1 | Philippe May | |
10 | 1 | Philippe May | h3. Custom models |
11 | 1 | Philippe May | |
12 | 1 | Philippe May | In the @qml@ table, define the style in the column @mapbox-paint@ corresponding to the type in the column @model_name@. |
13 | 1 | Philippe May | |
14 | 1 | Philippe May | h3. Models from categories |
15 | 1 | Philippe May | |
16 | 1 | Philippe May | In the @category@ table, these columns used for styling: |
17 | 1 | Philippe May | |
18 | 1 | Philippe May | * @mapbox_type_custom@: the mapbox type can be overridden, eg. @fill-extrusion@ for polygons (no other known useful cases) |
19 | 1 | Philippe May | |
20 | 1 | Philippe May | * @mapbox_paint@: the mapbox paint style |
21 | 1 | Philippe May | |
22 | 1 | Philippe May | * @mapbox_layout@: the mapbox layout (usually not used) |
23 | 1 | Philippe May | |
24 | 1 | Philippe May | |
25 | 1 | Philippe May | h2. Mapbox style definition |
26 | 1 | Philippe May | |
27 | 1 | Philippe May | The specification of mapbox paint styles can be found at https://www.mapbox.com/mapbox-gl-js/style-spec/ . |
28 | 1 | Philippe May | |
29 | 1 | Philippe May | For example: |
30 | 1 | Philippe May | |
31 | 1 | Philippe May | <pre> |
32 | 1 | Philippe May | {"fill-color": ["rgba", 204, 204, 255, 1]} |
33 | 1 | Philippe May | </pre> |
34 | 3 | Philippe May | |
35 | 3 | Philippe May | h2. Building fonts |
36 | 3 | Philippe May | |
37 | 3 | Philippe May | In the @gisaf-app@ directory: |
38 | 3 | Philippe May | <pre> |
39 | 3 | Philippe May | ./node_modules/.bin/build-glyphs src/assets/fonts/GisafSymbols.ttf src/assets/fonts/glyphs/GisafSymbols/ |
40 | 3 | Philippe May | </pre> |