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.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);
});
//to 500 5th St NW, Washington, District of Columbia, 20001
ESRI Please Help
I Resolve this by replacing the code with
var graphic = new esri.Graphic(latlog, stopSymbol);
I need you to mark your other question as answered also:Why Height Restriction is not working. Thanks!
No Sephe, but what you need actually?
Isn't this question cross-posted elsewhere on the forum?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.