You can integrate Commute Search into your UI to allow job seekers to search for jobs within a geographic area set by commute time. Commute Search estimates commute time based on a user's selected transit mode and the time of day they plan to travel.
Implementing Commute Search
Before you can implement Commute Search, Cloud Talent Solution must be hooked up to your UI. Follow the quickstart guides to set up Cloud Talent Solution.
Commute Search uses the address data that you uploaded with your jobs during CTS implementation to calculate commute time. To enable this feature on your existing CTS UI, send a
jobs.search
request and include aCommuteFilter
object in theJobQuery.commuteFilter
field.commuteMethod
,travelDuration
, andstartCoordinates
are required fields.Java
For more on installing and creating a Cloud Talent Solution client, see Cloud Talent Solution Client Libraries.
Python
For more on installing and creating a Cloud Talent Solution client, see Cloud Talent Solution Client Libraries.
Go
For more on installing and creating a Cloud Talent Solution client, see Cloud Talent Solution Client Libraries.
Ruby
For more on installing and creating a Cloud Talent Solution client, see Cloud Talent Solution Client Libraries.
Recommendations for your UI
Cloud Talent Solution doesn't allow searching by both distance (using the CTS location filter) AND commute time. To allow job seekers to access both options, use a 2-tab approach or similar.
Modify the front-end of your application so that when a job seeker requests a commute search, the back-end populates the relevant information in the commute filter and calls the API as it would in a regular search request.
Include these newly added items in your UI:
An option to choose whether this is a distance search or commute search. For example, your Search UI could look like the sample below:
A drop-down menu of commute method options.
An option to adjust traffic conditions.
The total travel time (the maximum supported travel time is 60 minutes).
Commute start time.
The commute time information returned from the API is then used to display information to the job seeker. Only relevant jobs located within the designated commute time area are returned in the results list. See the Job search Best Practices documentation for a discussion of ways to adjust the order and number of jobs returned within this area.
Generating a map with commute information (Recommended)
You can leverage the Maps API to generate a map based on the commute time information returned from the CTS API and embed it into the results returned to a job seeker. The Maps API suite has several options for displaying the map. Some Maps API options are more effective than others. For example, the Google Maps JavaScript Heatmap visualization paired with marker clustering is a great way to visualize the relevant jobs returned to a job seeker inside the area determined by their set commute preferences. Conversely, Directions Mode does not show all jobs returned in a search request and is not a recommended option.
For more information on implementing a commute-based search, see the Commute Search how-to guide.