Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

general: add offline country resolution #327

Merged
merged 1 commit into from
May 15, 2024
Merged

general: add offline country resolution #327

merged 1 commit into from
May 15, 2024

Conversation

zbycz
Copy link
Owner

@zbycz zbycz commented May 13, 2024

Using next-codegrid package.

TODO: unfortunately the service worker caches all the tiles (we can live with 1.5 MB though 🙂 )

How it works

Modification of the codegrid-js library for use in Next.js.

  • bundles all tiles as javascript chunks – both for client and server
  • this process adds 10 secs to the next build (TODO: optimize - store in /public ?)
    • output size is 10.5 MB (see .next/static/chunks), or 1.5 MB gzipped
  • first resolve takes ~40ms (both client and server), subsequent resolves are instant if it falls to the same tile
    • fetches 35kb for worldgrid, then 100-300kb for tile (or 13kb gzipped, then ~50kB for tile)

Copy link

vercel bot commented May 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
osmapp ✅ Ready (Inspect) Visit Preview May 15, 2024 8:29am

@zbycz zbycz merged commit bda6186 into master May 15, 2024
2 checks passed
@zbycz zbycz deleted the countries branch May 15, 2024 08:31
@zbycz zbycz mentioned this pull request May 15, 2024
@amenk
Copy link
Contributor

amenk commented May 25, 2024

There seems to be something wrong with this commit: eb02154

On production the country code is currently not shown:

image

On that feature branch it works:

image

Which problem did you try to fix with the commit?

amenk added a commit to OpenPlaceGuide/osmapp that referenced this pull request May 25, 2024
* Fetch federation instance(s) for the current feature from OpenPlaceGuide discover
* But only, if the country is list of supported countries
* Add links to the specific detail pages, if available

depends on fix of zbycz#327 (comment)
@amenk
Copy link
Contributor

amenk commented Jun 15, 2024

Let's follow this in a new issue: #363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants