RouteShape generalize option ignored

6 posts / 0 new
Last post
mgarkusha
RouteShape generalize option ignored

Hello,

 

The documentation for the routeShape API says this:

"If there is no mapState and fullShape = false, then the specified generalization factor will be used to generalize the shape. If the generalize parameter is 0, then no shape simplification will be done and all shape points will be returned."

 

My use case is that I need to return the whole route, from start to finish, without passing in a map state. If I hit the endpoint and pass in fullShape=true, and generalize to, say, 50, generalize should be ignored (as per the api) and full, highly detailed shape is returned. However, I don't need that much detail, so I should be able to say fullShape=false, and then the generalize option should be honored, using this url:

 

http://www.mapquestapi.com/directions/v2/routeShape?key=MY_SUPER_SECRET_...

 

But upon doing that I get this error: 

 

"No mapState found or fullShape specified in request. You must provide a mapState or fullShape=true when requesting a Route Shape."

 

Seems that the generalize option is being ignored even if fullShape is set to flase. Is this a bug or am I doing something incorrectly?

 

Thanks!


MQBrianCoakley
Thanks for the information.
Thanks for the information. That looks like a bug. It's now in the team's backlog. In the meantime, you can get the shape from the initial route request.

mgarkusha
Thanks for the response!

Thanks for the response!

If I'm not mistaken, the route shape isn't in the original route request. My current workaround is to just pass in a map state that encompasses the area that we're interested in, so something like:

 

http://www.mapquestapi.com/directions/v2/routeShape?key=MY_KEY&sessionId...

 

I'm looking forward to this bug being resolved, thanks!


MQBrianCoakley
Here is how I get it from the
Here is how I get it from the original route request: http://www.mapquestapi.com/directions/v2/route?key=KEY&shapeFormat=cmp6&... Blake St, Denver, CO  80202&to=555 17th St, Denver, CO  80202

Tonik
Progress

Hi. Has any progress been made on this issue?  A lot of the time fullShape=true returns over a thousand points and I don't want to limit using mapState.  The generalize parameter appears to be the solution, but it ain't working!  Argh!!


MQBrianCoakley
The route shape can be
The route shape can be returned using the generalize parameter in the original route request. If you're having issues with this method, post your request that is producing the unexpected response and we can take a look.