Skip to content

Commit

Permalink
ui-warped-map: downgrade maplibre-gl to v4
Browse files Browse the repository at this point in the history
maplibre-gl v5 causes multiple issues:

- The story is broken (JavaScript error trying to set pixelsToGLUnits).
  Upstream bug report: visgl/react-map-gl#2460
- A new TypeScript error pops up, went unnoticed because CI doesn't
  fail on these:

    (!) [plugin typescript] src/components/DataLoader.tsx (61:43): @rollup/plugin-typescript TS2345: Argument of type 'GeoJSONFeature' is not assignable to parameter of type 'MapGeoJSONFeature'.
      Type 'GeoJSONFeature' is missing the following properties from type '{ layer: (Omit<FillLayerSpecification, "source"> | Omit<LineLayerSpecification, "source"> | Omit<SymbolLayerSpecification, "source"> | ... 5 more ... | Omit<...>) & { ...; }; source: string; sourceLayer?: string | undefined; state: { ...; }; }': layer, source, state
    /home/simon/src/osrd-ui/ui-warped-map/src/components/DataLoader.tsx:61:43

    61               .map((f) => simplifyFeature(f, sourceLayer));

This commit effectively reverts:
#797

Signed-off-by: Simon Ser <[email protected]>
  • Loading branch information
emersion committed Jan 14, 2025
1 parent ab5aa4e commit 9214d3c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
36 changes: 23 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui-warped-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@turf/simplify": "^7.1.0",
"@turf/transform-translate": "^7.1.0",
"lodash": "^4.17.21",
"maplibre-gl": "^5.0.0",
"maplibre-gl": "^4.7.1",
"react-map-gl": "^7.1.7"
},
"peerDependencies": {
Expand Down

0 comments on commit 9214d3c

Please sign in to comment.