You are given a local JSON file ride-simple.json containing a recorded bike ride as an ordered list of GPS points.
Assume the file format is:
{
"points": [
{"lat": 47.58, "lon": -122.31},
{"lat": 47.581, "lon": -122.309},
...
]
}
You are also given a map-rendering HTTP API. The only allowed endpoint is:
POST /render
image/png
).
Your POST /render JSON may include:
center
:
{ "lat": number, "lon": number }
width
: integer pixels
height
: integer pixels
zoom
: integer
markers
: array of
{ "lat": number, "lon": number, "type": "start"|"stripe" }
paths
: array of
{ "points": [{"lat":..., "lon":...}, ...], "color": "blue"|"brown" }
ride-simple.json
and extract the ordered coordinate list.
POST /render
, render and save a map image for the following view settings:
{
"center": {"lat": 47.579, "lon": -122.31},
"width": 400,
"height": 600,
"zoom": 13
}
start
marker at the
first
coordinate.
stripe
marker at the
last
coordinate.
map_view.png
and
map_ride.png
).