routeParams = new esri.tasks.RouteParameters(); routeParams.stops = new esri.tasks.FeatureSet(); routeParams.returnRoutes = true; routeParams.returnDirections = true; routeParams.directionsLengthUnits = esri.Units.MILES; routeParams.outSpatialReference = map.spatialReference;
routeTask = new esri.tasks.RouteTask("http://servicesbeta.esri.com/ArcGIS/rest/services/Network/USA/NAServer/Route");
routeParams.stops.features = []; //Add the starting location to the map var fromSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([105, 153, 0])); var startLoc = new esri.Graphic(esri.geometry.geographicToWebMercator(new esri.geometry.Point(currentLocation, new esri.SpatialReference({ wkid : 4326 }))), fromSymbol, { Name : dojo.byId('loc').textContent, source: pointSource, RouteName : feature.attributes.FACILITY }); resultLocationsLayer.add(startLoc); routeParams.stops.features.push(startLoc); // params.stops.features[0] = startLoc; //Add the ending location to the map var toSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([204, 0, 0])); var endLoc = new esri.Graphic(feature.geometry, toSymbol, { Name : feature.attributes.FACILITY, source: "selected by buffer", RouteName : feature.attributes.FACILITY }); resultLocationsLayer.add(endLoc); routeParams.stops.features.push(endLoc);
routeTask.solve(routeParams); // routeTask.solve(params, function(solveResult) { dojo.connect (routeTask, "onSolveComplete", showRoute); dojo.connect (routeTask, "onError", routeError);
Solved! Go to Solution.
dojo.byID('loc').textContent
var startLoc = new esri.Graphic(esri.geometry.geographicToWebMercator(new esri.geometry.Point(currentLocation, new esri.SpatialReference({ wkid : 4326 }))), fromSymbol, { source: pointSource, RouteName : feature.attributes.FACILITY });
dojo.byID('loc').textContent
var startLoc = new esri.Graphic(esri.geometry.geographicToWebMercator(new esri.geometry.Point(currentLocation, new esri.SpatialReference({ wkid : 4326 }))), fromSymbol, { source: pointSource, RouteName : feature.attributes.FACILITY });
schlot;251279 wrote:
IE 8 did NOT properly interpret
dojo.byID('loc').textContent
The end result is the same no matter whether use the word "interpret" or "support". Po-tay-to, po-tah-to as far as I'm concerned. It doesn't work.
Do you know if it continues to be an issue with the newer version of IE?