AnsweredAssumed Answered

api version

Question asked by anjelinaponkerat on Dec 15, 2017
Latest reply on Dec 15, 2017 by anjelinaponkerat

Hi

I,m using closest facility sample, but the sample can not show direction when I use my own require and function code.  please help me...

 

 

<script>

var map,params, infos =[], dndSource, dynamicLayerInfos;
require([
"dojo/dom",
"esri/Color",
"dojo/keys",
"dojo/parser",
"dijit/registry",
"esri/urlUtils",
"esri/config",
"esri/sniff",
"esri/map",
"esri/SnappingManager",
"esri/dijit/Measurement",
"esri/layers/FeatureLayer",
"esri/tasks/GeometryService",
"esri/symbols/SimpleFillSymbol",
"esri/dijit/Scalebar",
"esri/dijit/BasemapGallery",
"esri/dijit/BasemapLayer",
"esri/dijit/Basemap",
"esri/dijit/OverviewMap",
"esri/tasks/locator",
"esri/dijit/Search",
"esri/symbols/PictureMarkerSymbol",
"esri/InfoTemplate",
"esri/dijit/HomeButton",
"esri/geometry/Extent",
"esri/SpatialReference",
"esri/dijit/VisibleScaleRangeSlider",
"esri/geometry/scaleUtils",
"esri/virtualearth/VETiledLayer",
"dijit/form/Button",
"esri/tasks/query",
"esri/geometry/Circle",
"esri/graphic",

"dojo/on",
"esri/toolbars/draw",
"esri/units",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/layers/DynamicLayerInfo",
"esri/layers/LayerDataSource",
"esri/layers/LayerDrawingOptions",
"esri/layers/TableDataSource",

"dojo/dom-construct",
"dojo/dom-style",
"dojo/query",
"dojo/_base/array",
"dojo/dnd/Source",

"esri/layers/ImageParameters",
"esri/dijit/Legend",
"dojo/agsjs/layers/GoogleMapsLayer",

"esri/lang",


"esri/layers/GraphicsLayer",
"esri/renderers/SimpleRenderer",

"esri/geometry/Point",
"esri/tasks/FeatureSet",

"esri/tasks/ClosestFacilityTask",
"esri/tasks/ClosestFacilityParameters",

"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"dijit/form/Button",
"dijit/form/ComboBox",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/TitlePane",
"dijit/Dialog",


], function(
dom, Color, keys, parser, registry, urlUtils, esriConfig,
has, Map, SnappingManager, Measurement,
FeatureLayer, GeometryService,
SimpleFillSymbol, Scalebar, BasemapGallery, BasemapLayer, Basemap, OverviewMap, Locator, Search, PictureMarkerSymbol, InfoTemplate, HomeButton, Extent, SpatialReference, VisibleScaleRangeSlider, scaleUtils, VETiledLayer, Button, Query, Circle, Graphic,
on, Draw, units, ArcGISDynamicMapServiceLayer, DynamicLayerInfo, LayerDataSource,
LayerDrawingOptions, TableDataSource, domConstruct, domStyle, query, arrayUtils, Source, ImageParameters, Legend, GoogleMapsLayer,esriLang, GraphicsLayer, SimpleRenderer, Point, FeatureSet, ClosestFacilityTask, ClosestFacilityParameters, SimpleMarkerSymbol, SimpleLineSymbol
) {
var incidentsGraphicsLayer, routeGraphicLayer, closestFacilityTask;
parser.parse();

Outcomes