Hi. I’m a total newbie to the TomTom traffic api but I need to get it working for a fun little web project that changes a website’s colour based on traffic flow. I’ve setup a key and followed the documentation to put together an API URL. I’m getting this error though:
Quick update, I got this working but not with the coordinates that I need it to. If I use the coordinates given in the example on the documentation page it works, but when I put the coordinates in for the location I need it breaks. I’ve separated them with a comma as instructed in the docs:
-2.560403,51.480635
Any suggestions on how to get those coordinates working?
Further update. Using the API explorer I tested the coordinates and got this message:
{
"error": "Point too far from nearest existing segment.",
"httpStatusCode": 400,
"detailedError": {
"code": "INVALID_REQUEST",
"message": "Point too far from nearest existing segment."
}
}
The coordinates are for the UK, which is covered in TomTom’s traffic flow coverage
Thanks, I had just figured this out myself. The website I was using to get coordinates outputted them longitude,latitude. Thanks, it’s working nicely now.
I’m picking this up again because I don’t think the data I’m getting is accurate. Over the past month every single time I’ve checked the data the traffic flow speed is either 47 or 49, not once has it been anything different. I’ve even checked when I can see the motorway in question, which a couple times has either been at a standstill or closed entirely due to a flood, the flow speed was still 49. I’m a total beginner with this, but is there a way to get more accurate information on flow speed? Or are there big limitations to the accuracy of the data?