AnsweredAssumed Answered

Adding Search widget to web app gives 404 error on esri/dijit/Search

Question asked by mai_quynhnhu on Jul 12, 2016

I am trying to add a search widget to my web app. However, I am getting a 404 error when adding esri/dijit/Search to the require array.

 

'use strict';

 

var mapApp=angular.module('domainus.app.map', ['ngRoute','domain.us.app.map.controllers']);

 

mapApp.config(['$routeProvider', function($routeProvider,StudentController) {

    $routeProvider.when('/', { controller: 'MapController'});

    $routeProvider.otherwise({redirectTo: '/'});

}]);

 

require([

    "esri/map",

    "dojo/domReady!",

    "esri/toolbars/navigation",

    "esri/toolbars/draw",

    "esri/layers/ArcGISDynamicMapServiceLayer",

    "esri/tasks/IdentifyParameters",

    "esri/tasks/IdentifyResult",

    "esri/tasks/IdentifyTask",

    "esri/layers/GraphicsLayer",

    "esri/dijit/InfoWindow",

    "esri/dijit/Search",

    "esri/layers/FeatureLayer",

    "esri/InfoTemplate"

  ], function () {

    var lScope=angular.element(document.getElementById('mapDiv')).scope();

    lScope.onReady.apply(lScope,arguments);

});

 

 

The other elements are not causing any problems. This one, however, looks for the file on our local server and gives a 404 error:

 

http://srv-ourarcgis-server/ourwebapp/js/arcgis/esri/dijit/Search.js

'Élément introuvable'

Outcomes