You are completing an “integration” exercise for a mapping service ("BikeMap"). You may use Google, but you must implement everything in code (you cannot run shell commands like curl).
simple.json
containing GPS points in JSON format:
[
{"lat": 37.7749, "lon": -122.4194},
{"lat": 37.7750, "lon": -122.4189}
// ...
]
curl -X POST "https://api.example.com/bikemap/render" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-d '{"mapStyle":"light","paths":[]}'
simple.json
, where each point must also include a color.
Assume colors are provided as an input list colors with the same length as the list of points (e.g., colors[i] corresponds to point points[i]). Your outgoing payload should include points in the form:
{"lat": 37.7749, "lon": -122.4194, "color": "red"}
simple.json
and print the first
10
coordinate pairs in order, one per line as:
<lat>,<lon>
curl
example. Print the HTTP status code and response body.