尚未偵測到更新。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