Repository navigation
feat: show a background grid while map tiles load - #2259
ben-milanko wants to merge 3 commits into
Conversation
JaffaKetchup
left a comment
There was a problem hiding this comment.
Hey, thanks for contributing! There are a few things to follow up on, but overall I think this is a nice addition.
(For completeness, it might be worth mentioning the old plugin which added a latlng grid layer, but that's a different purpose and also isn't updated to the latest versions, so it's mostly irrelevant here.)
Automatically compute grid color based on background color Add more customisation options to grid Remove over-the-top test suite
|
Hey @ben-milanko, I've made some fixes to the above requests, and also some other improvements. However, I don't seem to be able to push these to the PR/branch. Could you please check that you've checked the box allowing maintainers to make changes? If you're not happy to do this, let me know and I'll open a new PR and cherry pick your commit across to that. |
|
Hey @ben-milanko, sorry for the ping and hope you're all good. Just pinging to see if you'd be able to allow maintainers to edit this PR? If not, no problem, and I'll cherry pick your commit into a new PR so I can add my edits on top. |
|
Hey @JaffaKetchup sorry for the delay, just ticked the box now. |
Concerns addressed, as I am now a significant contributor to this PR I would like another maintainer to review




Empty map areas currently show a flat background while tiles load. Add a subtle grid beneath all map layers, enabled by default with 64 logical pixel cells at integer zoom levels. It follows panning, zooming, and rotation, and opaque tiles cover it as they fade in. Existing fallback tiles continue to cover the grid while replacement tiles load.
Expose
MapOptions.backgroundGridColorandMapOptions.backgroundGridSpacingfor customization. SettingbackgroundGridColor: nullrestores the plain background. Fully transparent map backgrounds remain transparent. When disabled, the background uses the existing plainColoredBoxwithout a grid painter or camera dependency.This intentionally changes the default map appearance. The grid is a background decoration, so it also remains visible through transparent tiles and in areas without tiles. The Tile Builder example includes a toggle, and the API documentation describes these behaviors.
Validation:
Developed and checked with OpenAI Codex; the validation listed above ran locally.