This is an automated email from the ASF dual-hosted git repository.
bchapuis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
The following commit(s) were added to refs/heads/main by this push:
new 8b46bef9 Style bridges in basemap (#576)
8b46bef9 is described below
commit 8b46bef964e8463f563c23b36d8e49dc13698714
Author: Bertil Chapuis <[email protected]>
AuthorDate: Mon Feb 6 08:32:24 2023 +0100
Style bridges in basemap (#576)
---
basemap/README.md | 6 +++---
basemap/layers/man_made/bridge.js | 18 ++++++++++++++++++
basemap/style.js | 2 ++
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/basemap/README.md b/basemap/README.md
index b0c22c6a..f05422be 100644
--- a/basemap/README.md
+++ b/basemap/README.md
@@ -23,7 +23,7 @@
jdbc:postgresql://localhost:5432/baremaps?user=baremaps&password=baremaps
Assuming that the necessary requirements have been installed, the database can
be populated with the following command.
```
-baremaps workflow execute --file workflow.json
+baremaps workflow execute --file workflow.js
```
The development server can be started with the following command.
@@ -31,8 +31,8 @@ The development server can be started with the following
command.
```
baremaps map dev --log-level DEBUG \
--database
'jdbc:postgresql://localhost:5432/baremaps?user=baremaps&password=baremaps' \
- --tileset 'tileset.json' \
- --style 'style.json'
+ --tileset 'tileset.js' \
+ --style 'style.js'
```
## Editing the tileset
diff --git a/basemap/layers/man_made/bridge.js
b/basemap/layers/man_made/bridge.js
new file mode 100644
index 00000000..b5c6e9f5
--- /dev/null
+++ b/basemap/layers/man_made/bridge.js
@@ -0,0 +1,18 @@
+export default {
+ id: 'man_made_bridge',
+ type: 'fill',
+ source: 'baremaps',
+ 'source-layer': 'man_made',
+ layout: {
+ visibility: 'visible',
+ },
+ directives: [
+ {
+ filter: ['==', ['get', 'man_made'], 'bridge'],
+ 'fill-color': 'rgb(184, 184, 184)',
+ },
+ ],
+ paint: {
+ 'fill-antialias': true,
+ },
+}
diff --git a/basemap/style.js b/basemap/style.js
index 1da672cb..438b2d6a 100644
--- a/basemap/style.js
+++ b/basemap/style.js
@@ -32,6 +32,7 @@ import ocean_background from './layers/ocean/background.js';
import route_line from "./layers/route/style.js"
import building_shape from "./layers/building/shape.js";
import building_number from "./layers/building/number.js";
+import man_made_bridge from "./layers/man_made/bridge.js";
import man_made_pier_line from "./layers/man_made/pier_line.js";
import man_made_pier_label from "./layers/man_made/pier_label.js";
import waterway_line from "./layers/waterway/line.js"
@@ -68,6 +69,7 @@ export default {
layer(waterway_line),
layer(waterway_tunnel_casing),
layer(waterway_tunnel_line),
+ layer(man_made_bridge),
layer(amenity_fountain),
layer(highway_tunnel_outline),
layer(highway_tunnel_line),