TheName
TheName

Reputation: 23

Retrieving previously calculated route [HERE Maps] using RouteeId fails with RouteNotReconstructed error

I'm calculating routes based on user input. Then storing the routeId and any additional informations I need. But the shape of the road is something I need occasionally; when the user wants to get a preview of the road again. Since I don't want to store all the points from shape I tried using getroute endpoint (https://developer.here.com/documentation/routing/topics/resource-get-route.html#resource-get-route) but I get this response:

{
    "_type": "ns2:RoutingServiceErrorType",
    "type": "ApplicationError",
    "subtype": "RouteNotReconstructed",
    "details": "Error is NGEO_ERROR_ROUTE_DESERIALIZATION",
    "additionalData": [
        {
            "key": "error_code",
            "value": "NGEO_ERROR_ROUTE_DESERIALIZATION"
        }
    ],
    "metaInfo": {
        "timestamp": "2018-08-01T15:01:56Z",
        "mapVersion": "8.30.86.150",
        "moduleVersion": "7.2.201830-34436",
        "interfaceVersion": "2.6.34",
        "availableMapVersion": [
            "8.30.86.150"
        ]
    } 
}

So the question is: why do I get the error? Following the API documentation https://developer.here.com/documentation/routing/topics/resource-type-error-route-not-reconstructed.html I can exclude wrong routeId (it works for routes saved e.g. today but not for the older ones). The route was calculated using the same version (7.2)

Is the routeId stored only for a certain amount of time? If so, how long?

Upvotes: 0

Views: 125

Answers (1)

Travelling Ape
Travelling Ape

Reputation: 46

RouteID changes with map version. https://developer.here.com/documentation/routing/topics/request-route-information.html

You'd need to recalculate periodically to get up to date RouteIDs.

Upvotes: 3

Related Questions