尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Convert Google Maps directions URLs into GPX files for Garmin, Bryton, Wahoo, and other GPS devices. Works with driving, cycling, and walking routes. No sign-up required — just paste and go.
Live site: maptogpx.com
npm install
Create a .env.local file with your Google Maps API key and Supabase credentials:
GOOGLE_MAPS_API_KEY=your_api_key_here
SUPABASE_URL=https://<project-ref>.supabase.co
SUPABASE_SECRET_KEY=sb_secret_...
The Supabase values are only needed for the feedback form. Get the secret key with
supabase projects api-keys --project-ref <project-ref> --reveal.
npm run dev
Open http://localhost:3000.
Run the test suite (no network calls, no env vars needed) with:
npm test
src/
├── app/
│ ├── layout.tsx # Root layout + metadata
│ ├── page.tsx # Home page
│ ├── globals.css # Tailwind + custom styles
│ └── api/
│ ├── convert/route.ts # Main conversion pipeline
│ ├── feedback/route.ts # Validates and stores user feedback
│ └── resolve-url/route.ts # Short URL expander
├── lib/
│ ├── types.ts # Shared interfaces
│ ├── analytics.ts # GA4 config + event tracking
│ ├── feedback-store.ts # Supabase REST insert for feedback
│ ├── same-origin.ts # Same-origin check for API routes
│ ├── rate-limit.ts # Per-IP in-memory rate limiter
│ ├── errors.ts # UserInputError (safe-to-show error messages)
│ ├── google-hosts.ts # Shared client/server Google Maps host matching
│ ├── url-parser.ts # Parse Google Maps URLs → coordinates
│ ├── google-directions-client.ts # Google Directions API routing
│ ├── gpx-generator.ts # GPX 1.1 XML generation
│ └── polyline.ts # Google encoded polyline decoder
└── components/
├── ConverterForm.tsx # Main UI (client component)
├── FeedbackForm.tsx # Rating + message + optional email form
└── GoogleAnalytics.tsx # GA4 tag loader
supabase/
└── migrations/ # Database schema (feedback table)
The Share Your Feedback section on the home page collects a 1–5 star rating, a
message, and an optional email (at least a rating or a message is required). Submissions go
through POST /api/feedback, which only accepts same-origin requests, validates the input,
drops bot submissions caught by a hidden honeypot field, and inserts the row into the
feedback table in Supabase using the secret key.
The table has row-level security enabled with no policies, so the public (anon) key can't read or write it. View submissions in the Supabase dashboard's Table Editor.
Schema changes live in supabase/migrations/. To apply new migrations:
supabase migration new <name> # create a migration file
supabase db push # apply it to the linked project
Google Analytics 4 uses measurement ID G-E4P5HTG25D for the MapsToGPX property
and MapsToGPX Web stream. No extra environment variable is required.
The tag loads after hydration in production builds. Collection is restricted to
maptogpx.com and www.maptogpx.com, excluding localhost and Vercel preview domains.
Existing Vercel Analytics and Speed Insights remain enabled.
Alongside automatic page views, scrolls, and outbound clicks, the app sends:
| Event | Trigger |
|---|---|
route_conversion | A route conversion finishes successfully. |
gpx_download | The user clicks to download the generated GPX file. |
feedback_submit | The user successfully submits the feedback form. |
donate_click | The user clicks a donate link (Venmo or PayPal) in the donate banner. |
Custom events contain no pasted Maps URLs, coordinates, route data, feedback content, or error messages. Google signals and ad personalization signals are disabled. The site's generated GPX download uses an explicit event because it isn't a standard file link.
After deploying, open Google Analytics Reports → Realtime, visit the live site, convert a route, and download its GPX file to verify the events.
google.com/maps/dir/Origin/Destination/@viewportgoogle.com/maps/dir/?api=1&origin=A&destination=B&waypoints=C|Dgoogle.com/maps?saddr=A&daddr=B+to:Cmaps.app.goo.gl/XXX47.6228,-122.33537405 168th Ave NE, Redmond, WA