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 b10a101a Disable antialias in basemap (#756)
b10a101a is described below
commit b10a101a9b7f4a273f4fe6842a2d5f101f2d8958
Author: Bertil Chapuis <[email protected]>
AuthorDate: Mon Aug 28 21:27:31 2023 +0200
Disable antialias in basemap (#756)
---
basemap/layers/amenity/background.js | 6 ++++++
basemap/layers/amenity/fountain.js | 2 +-
basemap/layers/amenity/overlay.js | 6 ++++++
basemap/layers/building/shape.js | 2 +-
basemap/layers/highway/pedestrian_area.js | 2 +-
basemap/layers/landuse/background.js | 18 +++++++++---------
basemap/layers/landuse/overlay.js | 14 +++++++-------
basemap/layers/leisure/background.js | 2 +-
basemap/layers/leisure/overlay.js | 2 +-
basemap/layers/man_made/bridge.js | 2 +-
basemap/layers/natural/background.js | 2 +-
basemap/layers/natural/overlay.js | 2 +-
basemap/layers/natural/water.js | 2 +-
basemap/layers/ocean/overlay.js | 2 +-
basemap/layers/power/background.js | 2 +-
15 files changed, 39 insertions(+), 27 deletions(-)
diff --git a/basemap/layers/amenity/background.js
b/basemap/layers/amenity/background.js
index 37ed4d6a..82edde22 100644
--- a/basemap/layers/amenity/background.js
+++ b/basemap/layers/amenity/background.js
@@ -44,4 +44,10 @@ export default asLayerObject(withSortKeys(directives), {
type: 'fill',
source: 'baremaps',
'source-layer': 'amenity',
+ layout: {
+ visibility: 'visible',
+ },
+ paint: {
+ 'fill-antialias': false,
+ },
});
diff --git a/basemap/layers/amenity/fountain.js
b/basemap/layers/amenity/fountain.js
index a161b433..2dd9235c 100644
--- a/basemap/layers/amenity/fountain.js
+++ b/basemap/layers/amenity/fountain.js
@@ -29,6 +29,6 @@ export default asLayerObject(directives, {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
});
diff --git a/basemap/layers/amenity/overlay.js
b/basemap/layers/amenity/overlay.js
index 77322d9e..d2023f35 100644
--- a/basemap/layers/amenity/overlay.js
+++ b/basemap/layers/amenity/overlay.js
@@ -33,4 +33,10 @@ export default asLayerObject(withSortKeys(directives), {
type: 'fill',
source: 'baremaps',
'source-layer': 'amenity',
+ layout: {
+ visibility: 'visible',
+ },
+ paint: {
+ 'fill-antialias': false,
+ },
});
diff --git a/basemap/layers/building/shape.js b/basemap/layers/building/shape.js
index cc816e47..52b56c87 100644
--- a/basemap/layers/building/shape.js
+++ b/basemap/layers/building/shape.js
@@ -21,8 +21,8 @@ export default {
visibility: 'visible',
},
paint: {
+ 'fill-antialias': false,
'fill-color': theme.buildingShapeFillColor,
- 'fill-antialias': true,
'fill-outline-color': theme.buildingShapeFillOutlineColor,
},
}
diff --git a/basemap/layers/highway/pedestrian_area.js
b/basemap/layers/highway/pedestrian_area.js
index 567ea7a5..d0765971 100644
--- a/basemap/layers/highway/pedestrian_area.js
+++ b/basemap/layers/highway/pedestrian_area.js
@@ -33,7 +33,7 @@ export default {
],
],
paint: {
+ 'fill-antialias': false,
'fill-color': theme.pedestrianAreaPaintFillColor,
- 'fill-antialias': true,
},
}
diff --git a/basemap/layers/landuse/background.js
b/basemap/layers/landuse/background.js
index 20680c86..c88eb2d3 100644
--- a/basemap/layers/landuse/background.js
+++ b/basemap/layers/landuse/background.js
@@ -9,7 +9,7 @@
or implied. See the License for the specific language governing permissions
and limitations under
the License.
**/
-import {withFillSortKey, asLayoutProperty, asPaintProperty} from
"../../utils/utils.js";
+import {withFillSortKey, asLayoutProperty, asPaintProperty, asLayerObject,
withSortKeys} from "../../utils/utils.js";
import theme from "../../theme.js";
let directives = [
@@ -109,17 +109,17 @@ let directives = [
filter: ['==', ['get', 'landuse'], 'pedestrian'],
'fill-color': theme.landuseBackgroundPedestrianFillColor,
},
-].map(withFillSortKey);
+];
-export default {
+export default asLayerObject(withSortKeys(directives), {
id: 'landuse_background',
type: 'fill',
source: 'baremaps',
'source-layer': 'landuse',
- layout: asLayoutProperty(directives, {
+ layout: {
visibility: 'visible',
- }),
- paint: asPaintProperty(directives, {
- 'fill-antialias': true,
- }),
-}
+ },
+ paint: {
+ 'fill-antialias': false,
+ },
+});
diff --git a/basemap/layers/landuse/overlay.js
b/basemap/layers/landuse/overlay.js
index cca18144..639aed9b 100644
--- a/basemap/layers/landuse/overlay.js
+++ b/basemap/layers/landuse/overlay.js
@@ -9,18 +9,18 @@
or implied. See the License for the specific language governing permissions
and limitations under
the License.
**/
-import {asLayerObject, withFillSortKey} from "../../utils/utils.js";
+import {asLayerObject, withFillSortKey, withSortKeys} from
"../../utils/utils.js";
import theme from "../../theme.js";
let directives = [
- {
- filter: ['==', ['get', 'landuse'], 'grass'],
- 'fill-color': theme.landuseOverlayGrassFillColor,
- },
{
filter: ['==', ['get', 'landuse'], 'forest'],
'fill-color': theme.landuseOverlayForestFillColor,
},
+ {
+ filter: ['==', ['get', 'landuse'], 'grass'],
+ 'fill-color': theme.landuseOverlayGrassFillColor,
+ },
{
filter: ['==', ['get', 'landuse'], 'greenhouse_horticulture'],
'fill-color': theme.landuseOverlayGreenhouseHorticultureFillColor,
@@ -35,7 +35,7 @@ let directives = [
},
];
-export default asLayerObject(withFillSortKey(directives), {
+export default asLayerObject(withSortKeys(directives), {
id: 'landuse_overlay',
type: 'fill',
source: 'baremaps',
@@ -44,6 +44,6 @@ export default asLayerObject(withFillSortKey(directives), {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
});
diff --git a/basemap/layers/leisure/background.js
b/basemap/layers/leisure/background.js
index 4388a7e3..626296a3 100644
--- a/basemap/layers/leisure/background.js
+++ b/basemap/layers/leisure/background.js
@@ -45,6 +45,6 @@ export default asLayerObject(withSortKeys(directives), {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
});
diff --git a/basemap/layers/leisure/overlay.js
b/basemap/layers/leisure/overlay.js
index f8ee7327..f28076f6 100644
--- a/basemap/layers/leisure/overlay.js
+++ b/basemap/layers/leisure/overlay.js
@@ -66,6 +66,6 @@ export default asLayerObject(withSortKeys(directives), {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
});
diff --git a/basemap/layers/man_made/bridge.js
b/basemap/layers/man_made/bridge.js
index 857c9478..e82241b7 100644
--- a/basemap/layers/man_made/bridge.js
+++ b/basemap/layers/man_made/bridge.js
@@ -28,6 +28,6 @@ export default asLayerObject(directives, {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
});
diff --git a/basemap/layers/natural/background.js
b/basemap/layers/natural/background.js
index 40665dd0..e53da468 100644
--- a/basemap/layers/natural/background.js
+++ b/basemap/layers/natural/background.js
@@ -64,6 +64,6 @@ export default asLayerObject(withSortKeys(directives), {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
});
diff --git a/basemap/layers/natural/overlay.js
b/basemap/layers/natural/overlay.js
index ac5facd6..ac445a54 100644
--- a/basemap/layers/natural/overlay.js
+++ b/basemap/layers/natural/overlay.js
@@ -52,6 +52,6 @@ export default asLayerObject(withSortKeys(directives), {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
});
diff --git a/basemap/layers/natural/water.js b/basemap/layers/natural/water.js
index d1e93679..f82ceccc 100644
--- a/basemap/layers/natural/water.js
+++ b/basemap/layers/natural/water.js
@@ -20,7 +20,7 @@ export default {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
directives: [
{
diff --git a/basemap/layers/ocean/overlay.js b/basemap/layers/ocean/overlay.js
index 5a31e359..d37b8f0c 100644
--- a/basemap/layers/ocean/overlay.js
+++ b/basemap/layers/ocean/overlay.js
@@ -29,6 +29,6 @@ export default asLayerObject(withSortKeys(directives), {
visibility: 'visible',
},
paint: {
- 'fill-antialias': true,
+ 'fill-antialias': false,
},
});
diff --git a/basemap/layers/power/background.js
b/basemap/layers/power/background.js
index 33bd8f51..b97161bd 100644
--- a/basemap/layers/power/background.js
+++ b/basemap/layers/power/background.js
@@ -22,8 +22,8 @@ export default {
visibility: 'visible',
},
paint: {
+ 'fill-antialias': false,
'fill-color': theme.powerBackgroundPowerPlantFillColor,
- 'fill-antialias': true,
'fill-outline-color': theme.powerBackgroundPowerPlantFillOutlineColor,
},
}