Fix projection matrix for raster image drawables (#2242)

This commit is contained in:
Stefan Karschti
2024-04-17 16:11:08 +03:00
committed by GitHub
parent e53143c902
commit 6919081030
10 changed files with 219 additions and 20 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@@ -0,0 +1,109 @@
{
"version": 8,
"metadata": {
"test": {
"width": 456,
"height": 456
}
},
"center": [
-75.9705,
42.1865
],
"zoom": 5,
"sources": {
"image": {
"type": "image",
"url": "local://image/radar2.png",
"coordinates": [
[
-80.425,
46.437
],
[
-71.516,
46.437
],
[
-71.516,
37.936
],
[
-80.425,
37.936
]
]
},
"geojson": {
"type": "geojson",
"data": {
"type": "Polygon",
"coordinates": [
[
[
-80.425,
46.437
],
[
-71.516,
46.437
],
[
-71.516,
37.936
],
[
-80.425,
37.936
],
[
-80.425,
46.437
]
],
[
[
-78.425,
44.437
],
[
-78.425,
39.936
],
[
-73.516,
39.936
],
[
-73.516,
44.437
],
[
-78.425,
44.437
]
]
]
}
}
},
"layers": [
{
"id": "fill-opaque",
"type": "fill",
"source": "geojson",
"paint": {
"fill-color": "blue"
}
},
{
"id": "image-translucent",
"type": "raster",
"source": "image",
"paint": {
"raster-fade-duration": 0
}
}
]
}