AnsweredAssumed Answered

Why Height Restriction is not working

Question asked by ashishn on May 3, 2015
Latest reply on May 26, 2015 by sephefox

routeTask = new esri.tasks.RouteTask("http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World");

routeParams = new esri.tasks.RouteParameters();

dojo.connect(routeTask, "onSolveComplete", showRoute);

routeParams.restrictionAttributes = ["Use Preferred Truck Routes","Height Restriction"];

routeParams.attributeParameterValues = [{
"attributeName": "Use Preferred Truck Routes",
"parameterName": "Restriction Usage",
"value": "Prefer_High"
},{
"attributeName": "Height Restriction",
"parameterName": "Vehicle Height (meters)",
"value": 40000

}];

routeParams.outSpatialReference = { "wkid": 102100 };

if (li.length != routeParams.stops.features.length) {

                    var x = locationPoint[li.length - 1].getLatitude();

                    var y = locationPoint[li.length - 1].getLongitude();

                    var latlog = new esri.geometry.Point(y, x);

                    var webMercator = new esri.geometry.webMercatorUtils.geographicToWebMercator(latlog);

                    var point = new esri.geometry.Point(webMercator.x, webMercator.y, new esri.SpatialReference({ wkid: 102100 }));

                    var graphic = new esri.Graphic(point, stopSymbol);

                      routeParams.stops.features.push(new esri.Graphic(point, stopSymbol));

                        }

if (li.length>=2) {

routeTask.solve(routeParams);

}

    function showRoute(solveResult) {
        clearRoutes();
        dojo.forEach(solveResult.routeResults, function (routeResult, i) {
            routes.push(map.graphics.add(routeResult.route.setSymbol(routeSymbols)));
       

});

}

 

    }
// For addres: 550 C St SW, Washington, District of Columbia, 20024 (here is tunnel)

//to 500 5th St NW, Washington, District of Columbia, 20001

 

ESRI Please Help

Outcomes