Generate map images based on route data
This endpoint generates a map image based on the provided route data.
Add the header x-api-key with your API key in each request:
"x-api-key: YOUR_API_KEY"
filename (optional) - Specify a custom filename for the generated map image
Examples:
/generate-map?filename=my-custom-map-name
/generate-map?filename=my-custom-map-name.png
If not provided, a unique filename will be generated automatically using UUID.
Send an array of objects representing the points on the route:
[
{
"name": "Skagen",
"latitude": 57.7209,
"longitude": 10.5839
},
{
"name": "Southampton",
"latitude": 50.9138,
"longitude": -1.47053
}
]
The PNG image is returned as a binary response.
Headers:
Content-Type: image/png
Returned if the input data is invalid.
Body:
{
"error": "Invalid input data"
}
Returned if the API key is missing or incorrect.
Body:
{
"error": "Forbidden: Invalid API key"
}
Returned if there was an error generating the map.
Body:
{
"error": "Failed to generate map"
}