mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-24 07:53:09 +00:00
292f1b181c
Map-Features had no GPX section at all, so the tracks paragraph is new rather than an addition.
71 lines
4.5 KiB
Markdown
71 lines
4.5 KiB
Markdown
# Places and Search
|
|
|
|
Places are the building blocks of your trip. You can add them by searching, pasting a URL, entering coordinates, or importing a file.
|
|
|
|

|
|
|
|
## Adding a place
|
|
|
|
Click **+ Add Place** at the top of the Places sidebar to open the Place form. You can also **right-click anywhere on the map** to create a place at that exact location — the address is reverse-geocoded and pre-filled automatically.
|
|
|
|
## Searching for a place
|
|
|
|
Type in the search box at the top of the form. After 2 or more characters, with a 300 ms debounce, suggestions appear in a dropdown.
|
|
|
|
- Use **↑ / ↓** to navigate results, **Enter** to select, **Esc** to dismiss.
|
|
- Search results are biased toward the geographic center of your existing trip places. When those places span more than ~500 km, the bias is skipped.
|
|
|
|
### With a Google Maps API key
|
|
|
|
> **Admin:** A Google Maps API key is configured in [User-Settings](User-Settings).
|
|
|
|
When a key is present, the autocomplete uses the Google Places API, which can return ratings, opening hours, photos, and phone numbers from Google's database.
|
|
|
|
> **API key restrictions:** TREK calls the Google Places API from the server, not the browser. If you apply **HTTP referrers** restrictions to your key in Google Cloud Console, you must also set `APP_URL` in your environment — TREK sends it as the `Referer` header on every outbound Google API request. Without it, Google will reject all server-side calls with `REQUEST_DENIED`. For server-side deployments, **IP address** restrictions are simpler and require no extra configuration. See [Troubleshooting](Troubleshooting) if photos are missing after adding a key.
|
|
|
|
### Without a Google Maps API key
|
|
|
|
TREK falls back to OpenStreetMap (Nominatim) automatically — no API key needed. A notice appears above the search box explaining that OpenStreetMap is in use and that photos, ratings, and opening hours are unavailable. Results include name, address, and coordinates.
|
|
|
|
## Pasting a Google Maps URL
|
|
|
|
Paste a `maps.app.goo.gl/…`, `goo.gl/maps/…`, or `maps.google.*/…` URL directly into the search box and press the search button. TREK resolves it server-side and populates the name, address, and coordinates.
|
|
|
|
## Entering coordinates manually
|
|
|
|
Type or paste a `lat, lng` pair (e.g. `48.8566, 2.3522`) into the **Latitude** field. TREK detects the comma-separated pair and fills both coordinate fields at once.
|
|
|
|
## Place fields
|
|
|
|
<!-- TODO: screenshot: Place form with all fields visible -->
|
|
|
|
| Field | Notes |
|
|
|---|---|
|
|
| Name | Required |
|
|
| Description | Free text |
|
|
| Notes | Free text, max 2 000 characters |
|
|
| Address | Free text |
|
|
| Latitude / Longitude | Decimal degrees |
|
|
| Category | Pick an existing category or type a new name to create one inline (default color `#6366f1`, icon `MapPin`) |
|
|
| Start time / End time | Shown only when editing an existing place |
|
|
| Website | URL |
|
|
| File attachments | Images or PDFs — click the Paperclip icon or paste from the clipboard |
|
|
|
|
Two inline warnings are shown when editing times: one if the end time is set to a value before or equal to the start time, and one if the times overlap with another place already assigned to the same day.
|
|
|
|
## Custom place image
|
|
|
|
By default a place's thumbnail is fetched automatically (from Google/OpenStreetMap when the place was imported or matched, otherwise a category icon). To use your own photo instead, open the place's detail panel and click its round thumbnail — pick an image and it becomes that place's thumbnail everywhere (list, map marker, itinerary, PDF export and shared trips). A small remove button on the thumbnail clears the custom image and restores the automatic default. Accepted formats are JPG, PNG, GIF and WebP (HEIC is converted automatically), up to 20 MB.
|
|
|
|
The same control is available on saved places in [Collections](Collections#place-detail).
|
|
|
|
## Importing multiple places
|
|
|
|
Drag a `.gpx`, `.kml`, or `.kmz` file onto the Places sidebar to import all waypoints or features at once. You can also import a saved-list share URL using the **Import list** button in the sidebar header — both Google Maps and Naver Maps list URLs are supported.
|
|
|
|
Imported tracks each get their own line colour so multiple routes stay apart on the map; you can override it per track from the place details. See [Map Features](Map-Features) for the details.
|
|
|
|
> **Admin:** Google Maps API key is set in [User-Settings](User-Settings). Without it, OSM search is used automatically.
|
|
|
|
**See also:** [Day-Plans-and-Notes](Day-Plans-and-Notes) · [Map-Features](Map-Features) · [Tags-and-Categories](Tags-and-Categories)
|