Cleanup: Remove Leaflet, replace with LngLatTuple in [lng, lat] order#72
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ate order throughout Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com>
|
|
Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com>
|
*Lighthouse ran on https://mobilitydatabase-8ffnh0ow9-mobility-data.vercel.app/ * (Desktop)
*Lighthouse ran on https://mobilitydatabase-8ffnh0ow9-mobility-data.vercel.app/feeds * (Desktop)
*Lighthouse ran on https://mobilitydatabase-8ffnh0ow9-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-8ffnh0ow9-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-8ffnh0ow9-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
|
Alessandro100
left a comment
There was a problem hiding this comment.
tested and works well



Leaflet was only remaining in the codebase as type imports (
LatLngTuple,LatLngExpression). This removes the packages entirely and introduces a properLngLatTupletype aligned with GeoJSON/MapLibre convention.Type replacement
Added to
src/app/types.ts:Replaces
LatLngTuple/LatLngExpressionfromleafletacross 8 files.Coordinate order fix (bonus)
Leaflet stored coordinates as
[lat, lng]; GeoJSON/MapLibre expects[lng, lat]. All bounding-box creation sites now emit[lng, lat]directly:getBoundingBox/selectFeedBoundingBox/selectBoundingBoxFromLatestDataset/computeBoundingBox— swapped to[lng, lat]getBoundsFromCoordinates— destructures([lng, lat])instead of([lat, lng])Map.tsx— removed the[p[1], p[0]]coordinate swap; polygon data is now in the correct format at the sourcePackage removal
Removed
leaflet,@types/leaflet, andreact-leafletfrompackage.jsonand dropped thejest.mock('react-leaflet', () => ({}))stub fromsetupTests.ts.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node index.js --exec install(dns block)/opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node dist/index.js --exec install(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.