Developers
TruckMap supports universal links, which allows any app to open a place (like a truck stop, weigh station, or gas station), route, or list of search results inside of the TruckMap app.
Place / Address
URL scheme:
link: https://truckmap.com/place/{place}
Discussion:
The app will attempt to open a detailed view of the place passed in the url.
A {place} can be any of the following:
– The id of a place stored on the TruckMap database.
– The latitude and longitude of a place, separated by commas.
– The address of a place. The app will return its best guess based on this string.
Examples: (Open on phone)
https://truckmap.com/place/8d3fb90f-3e8c-48cc-a30f-20eb856952ba
https://truckmap.com/place/40.724401,-73.988185
https://truckmap.com/place/125 S Clark St, Chicago, IL 60603
Places List
URL scheme:
link: https://truckmap.com/places?type={type}&lat={lat}&lon={lon}
Discussion:
The app will attempt to open a list of places matching the query parameters. If coordinates are not passed, the app will search around the user’s current location.
Parameters:
– type: A slug representing the category of place for which to show results. Some common types are
– rest-area
– weigh-station
– diesel-fuel
– lat: The latitude around which to search.
– lon: The longitude around which to search.
Examples: (Open on phone)
https://truckmap.com/places?type=truck-stop&lat=40.71427&lon=-74.00597
https://truckmap.com/places?type=rest-area&lat=39.09973&lon=-94.57857
https://truckmap.com/places?type=diesel-fuel
Create Route
URL scheme:
link: https://truckmap.com/route/{waypoint}/{waypoint}/…
Discussion:
The app will attempt to create a route from all of the waypoints contained in the url, in order of appearance. If only a single waypoint is included, the app will prepend the user’s current location as the starting point.
A {waypoint} can be any of the following:
– The id of a place stored on the TruckMap database.
– The latitude and longitude of a place, separated by commas.
– The address of a place. The app will return its best guess based on this string.
– The string ‘current-location’. The app will substitute the user’s current location.