Integrate Cycling Coordinates with a Map Route API
Quick Overview
Integrate cycling coordinates with a map route API by validating coordinate conventions, constructing documented requests, decoding geometry, and checking rendering.
Integrate Cycling Coordinates with a Map Route API
Company: Stripe
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
Given cycling data and a map service's API documentation, implement the integration that reads coordinates, calls the map API, and renders the route. Explain how you determine coordinate conventions, construct requests, and verify that the displayed route corresponds to the input.
### Constraints & Assumptions
The actual data schema, endpoint, authentication method, and route response format are not supplied in the report. Use the provided project documentation as the authority when implementing; do not guess a vendor-specific request.
### Clarifying Questions to Ask
- Are input coordinates latitude/longitude or longitude/latitude, and in what units?
- Does the API return a routed path, raw geometry, or an encoded polyline?
- Are all points passed as waypoints, and what request-size/rate limits apply?
```hint Validate a tiny known route first
A coordinate-order error can produce a plausible-looking map in the wrong place.
```
### What a Strong Answer Covers
- Parsing and validating coordinates under the documented schema.
- An API adapter with timeouts, error handling, and response validation.
- Correct geometry decoding/rendering and checks against start/end points.
### Follow-up Questions
- How would you batch a long ride that exceeds the waypoint limit?
- What should the interface show when only part of the route request succeeds?
Overview: Integrate cycling coordinates with a map route API by validating coordinate conventions, constructing documented requests, decoding geometry, and checking rendering.
Given cycling data and a map service's API documentation, implement the integration that reads coordinates, calls the map API, and renders the route. Explain how you determine coordinate conventions, construct requests, and verify that the displayed route corresponds to the input.
Constraints & Assumptions
The actual data schema, endpoint, authentication method, and route response format are not supplied in the report. Use the provided project documentation as the authority when implementing; do not guess a vendor-specific request.
Clarifying Questions to Ask Guidance
Are input coordinates latitude/longitude or longitude/latitude, and in what units?
Does the API return a routed path, raw geometry, or an encoded polyline?
Are all points passed as waypoints, and what request-size/rate limits apply?
What a Strong Answer Covers Guidance
Parsing and validating coordinates under the documented schema.
An API adapter with timeouts, error handling, and response validation.
Correct geometry decoding/rendering and checks against start/end points.
Follow-up Questions Guidance
How would you batch a long ride that exceeds the waypoint limit?
What should the interface show when only part of the route request succeeds?