Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 3.07 KB

README.md

File metadata and controls

63 lines (44 loc) · 3.07 KB

Static resources and short links (ge0) decoder for Organic Maps

Root domain redirects to https://organicmaps.app/.

URLs like http(s)://omaps.app/ENCODEDCOORDINATES/PINNAME are decoded to lat, lon and zoom level. Then the OSM map is displayed and url schemes are opened on mobile apps.

Human-readable links use https://omaps.app/LAT,LON[/PINNAME][?z=ZOOM]. Each coordinate may be an integer or a decimal, so links such as https://omaps.app/-14.333333,-170/American_Samoa work even when another app rounds a coordinate. Latitude must be in [-90,90] and longitude in [-180,180]; zoom defaults to 14.

Add some query parameters to test:

Deploy master to Production

Requirements

Use Node.js 24, as specified in .nvmrc and used by CI.

Install CloudFlare's wrangler and other dev dependencies using npm:

npm i

Development

Use npx wrangler dev for localhost development.

Run npm run lint for Oxlint and TypeScript 7 type checking. To check types alone, run npm run typecheck. Formatting is checked separately with npm run format:check; use npm run format to apply Prettier formatting.

Run npm run upgrade to update dependencies. The command uses npm-check-updates --peer to skip updates that conflict with peer requirements. Commit both package.json and package-lock.json after upgrades.

Deployment

All pushes to master automatically deploy dev version to https://url-processor.omaps.workers.dev/

Deploy to prod manually using npx wrangler publish --env omaps or this action.

Known issues

  • Hidden directories and symlinks in worker site assets are ignored by wrangler.
  • Cloudflare's free Flexible SSL certificates does not support 4-th level subdomains like a.b.example.com, so you can see strange SSL errors.
  • HTTPS fetch requests from Workers are converted to HTTP ones if the target host is in the same Cloudflare zone, see here for more details.