-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make the transformation of directives more explicit * Add a helper that adds sort key properties to directives * Improve ordering of several layers
- Loading branch information
Showing
35 changed files
with
2,364 additions
and
2,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import {asLayerObject, withSortKeys} from "../../utils/utils.js"; | ||
|
||
let directives = [ | ||
{ | ||
'filter': ['==', ['get', 'aeroway'], 'runway'], | ||
'line-color': 'rgba(187, 187, 204, 1.0)', | ||
'road-width': 30, | ||
}, | ||
{ | ||
'filter': ['==', ['get', 'aeroway'], 'taxiway'], | ||
'line-color': 'rgba(187, 187, 204, 1.0)', | ||
'road-width': 14, | ||
}, | ||
]; | ||
|
||
export default asLayerObject(withSortKeys(directives), { | ||
id: 'aeroway_line', | ||
type: 'line', | ||
source: 'baremaps', | ||
'source-layer': 'aeroway', | ||
filter: ['==', ['geometry-type'], 'LineString'], | ||
layout: { | ||
'line-cap': 'round', | ||
'line-join': 'round', | ||
visibility: 'visible', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {asLayerObject, withSortKeys} from "../../utils/utils.js"; | ||
|
||
let directives = [ | ||
{ | ||
filter: ['==', ['geometry-type'], 'Polygon'], | ||
'fill-color': 'rgba(187, 187, 204, 1.0)', | ||
}, | ||
]; | ||
|
||
export default asLayerObject(withSortKeys(directives), { | ||
id: 'aeroway_polygon', | ||
type: 'fill', | ||
source: 'baremaps', | ||
'source-layer': 'aeroway', | ||
layout: { | ||
visibility: 'visible', | ||
}, | ||
paint: { | ||
'fill-antialias': true, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default { | ||
id: 'aeroway', | ||
queries: [ | ||
{ | ||
minzoom: 12, | ||
maxzoom: 20, | ||
sql: | ||
"SELECT id, tags, geom FROM osm_ways_z$zoom WHERE tags ? 'aeroway'", | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,35 @@ | ||
export default { | ||
id: 'amenity_fill_1', | ||
import {asLayerObject, withSortKeys} from "../../utils/utils.js"; | ||
|
||
let directives = [ | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'kindergarten'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'school'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'college'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'university'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'hospital'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'grave_yard'], | ||
'fill-color': 'rgb(170, 203, 175)', | ||
}, | ||
]; | ||
|
||
export default asLayerObject(withSortKeys(directives), { | ||
id: 'amenity_background', | ||
type: 'fill', | ||
source: 'baremaps', | ||
'source-layer': 'amenity', | ||
layout: { | ||
visibility: 'visible', | ||
}, | ||
paint: { | ||
'fill-antialias': true, | ||
}, | ||
directives: [ | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'kindergarten'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'school'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'college'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'university'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'hospital'], | ||
'fill-color': 'rgb(255, 255, 228)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'grave_yard'], | ||
'fill-color': 'rgb(170, 203, 175)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'parking'], | ||
'fill-color': 'rgb(238, 238, 238)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'motorcycle_parking'], | ||
'fill-color': 'rgb(238, 238, 238)', | ||
}, | ||
], | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {asLayerObject, withSortKeys} from "../../utils/utils.js"; | ||
|
||
let directives = [ | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'motorcycle_parking'], | ||
'fill-color': 'rgb(238, 238, 238)', | ||
}, | ||
{ | ||
filter: ['==', ['get', 'amenity'], 'parking'], | ||
'fill-color': 'rgb(238, 238, 238)', | ||
}, | ||
]; | ||
|
||
export default asLayerObject(withSortKeys(directives), { | ||
id: 'amenity_overlay', | ||
type: 'fill', | ||
source: 'baremaps', | ||
'source-layer': 'amenity', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.