HERE Maps JS API Routing with ABR and Height limitations

119 views Asked by At

I've recently came across a problem I'm using here maps JS api routing in specifically, and I am trying to add restrictions for example using height or weight. For some reason it ignores it, I'm using fleet telematics tiles as well from HERE, so its showing me relative information regarding here.

enter image description here

my options are:

        let routingParameters = {
            'routingMode': 'short',
            'transportMode': 'truck',
            'origin': locationPoints.A.lat+','+locationPoints.A.lon,
            'destination': locationPoints.B.lat+','+locationPoints.B.lon,
            'truck': {
                'height': 600,
                'grossWeight': 22000
            },
            'return': 'polyline,summary'
        };

Everything is fine with routing itself, maybe I am missing something? Is there an option to avoid those things?

Logically speaking, it wouldn't be possible to drive trough a 4.5 under tunnel with 6m of height, so it shouldn't be an option even if there wouldnt be a good road for it routing wise.

1

There are 1 answers

0
Thomas J. On BEST ANSWER

I managed to figure it out, seems like they key has to be in the key itself, for example.

    let routingParameters = {
        'routingMode': 'short',
        'transportMode': 'truck',
        'origin': locationPoints.A.lat+','+locationPoints.A.lon,
        'destination': locationPoints.B.lat+','+locationPoints.B.lon,
        'truck[height]': 600,
        'return': 'polyline,summary'
    };

Will most definetely work. Who ever will run across the same problem.