Whenever I try to add a polyline between points of equal latitude, Mapbox responds with an error (example shown below). If I change the latitude of one of the points by 0.00001 degrees, then it works fine.
Does anyone understand why?
Example: Try to add a polyline between the points (40, -90) and (40, -91). Using Google’s Interactive Polyline Encoder Utility, as shown in screenshot below, gives the following encoded polyline: _ocsF~bidP?~hbE
But when using this encoded polyline in a request, Mapbox responds with an error as described below:
Request:
https://api.mapbox.com/styles/v1/mapbox/streets-v11/static/path-1+e00-2(_ocsF~bidP?~hbE)/-90,40,7,0,0/500x400?access_token=YOUR_MAPBOX_ACCESS_TOKEN
Response: {"message":"Not Authorized - No Token"}
Now change the latitude of the second point to 40.00001. Using Google’s Interactive Polyline Encoder Utility gives the following encoded polyline: _ocsF~bidPA~hbE
And using this encoded polyline in a request returns the image I expect:
Request:
https://api.mapbox.com/styles/v1/mapbox/streets-v11/static/path-1+e00-2(_ocsF~bidPA~hbE)/-90,40,7,0,0/500x400?access_token=YOUR_MAPBOX_ACCESS_TOKEN
Response: