For Zoom Level beyond 5


I read this in Traffic API:

*** For zoom level 5 and greater, the width and height cannot exceed 40075016.68 / 2zoom - 4.**

Now here are my bounding box coordinates:

X1, Y1 = 2562945.74302676, 11968880.08350232

X2, Y2 = 2563486.87943910, 11971060.95951590

X2 - X1 = Width = 541.13641234
Y2 - Y1 = Height = 2180.87601358

Zoom = 12

If I understand the statement written in Traffic Api my width, height shouldn’t be greater than 40075016.68 / 2^12 - 4 = 156543.033906

So basically the width & height as you can see above don’t exceed 156543.033906.

Problem that I am facing:

Although I respect the inputs the traffic incidents that I get are outside my bounding box.

Am I doing something wrong?


Hello Team! Waiting for your response. Thanks!


It would be great to see the details of your particular call so that we will be sure what’s going on with the response which you are getting.
It is possible that your request is using the expandCluster parameter and the cluster itself, which you get from the response, can be located near to the bounding box borders. After expanding it, some of the incidents can appear outside of the bounding box which might be the case in your scenario.


No I am not using expandCluster parameter. The default value is false & I am keeping the default.

API Call:*****


Thanks a lot for sharing the call. Unfortunately, it’s empty now as the incidents are changing quite often. It would be great to see the call together with a response in which we’ll be able to see the problem. We will try to perform some tests on our side also.


Hi @PremN.

Unfortunately (or luckily :slight_smile: ) we’ve managed to reproduce the issue which you have encountered. The bug is already created and waits for the fix.

Thanks a lot for finding this issue.

I’ll let you know immediately when it’ll be ready.


Hi @PremN.

I’ve just got a response from the API team.

The investigation showed that described problem is not a bug.

First part of a problem: “incident appears to be outside of the requested bounding box”. In fact incident consists of two things, POI and tube (whole geometry). Coordinates given in the response (fields “p” and “op”) are in fact the coordinates of the POI, which is the beginning coordinate of the incident. The tube is coded within “v” field. When a particular incident is checked if it belongs to the requested bbox, the whole incident bbox is checked if it intersects with requested bounding box, not only if its POI belong to it.

Second part of a problem: “cluster appears to be outside requested bounding box”. Cluster is considered as belonging to the requested bbox if at least part of at least one of its incidents belongs to the requested bounding box (take a look at above explanation of first part). The borders of the cluster are described by “ctr” and “cbl” fields. However, the cluster area is computed based on the incidents POI location, not based on the whole incident geometry. As a result cluster area appears to be smaller comparing to the actual length of its incidents.

The API documentation on the portal will be updated with more details.


I am not able to grasp from your response. I am not aware of V field or POI. Can you please give an example of the same so that I can understand?

A traffic incident consists of a beginning point and a “tube” - an incident geometry encoded within the ‘v’ field using the Polyline Algorithm.
Given above - if any part of the incident “tube” is lying inside the given bounding box, the incident is included in the API response even if the beginning of that incident is lying outside of the bounding box. Similar applies to the clusters.

I hope this helps a little bit.