AnsweredAssumed Answered

Conflict between dojo Require and code assist

Question asked by panciba on May 31, 2015

Hi,

when I use standard AMD loader for modules, code assist is not working:

 

/// <reference path="typings/arcgis-js-api/arcgis-js-api.d.ts"/>

require(["esri/map", "esri/layers/FeatureLayer", "dojo/domReady!"], function(Map, FeatureLayer) {
  var map = new Map("map", {
    center: [-118, 34.5],
    zoom: 8,
    basemap: "topo"
  });
});

 

 

But when I switch require to define like that, code assist starts working, but script throws exception "Error: multipleDefine"

 

/// <reference path="typings/arcgis-js-api/arcgis-js-api.d.ts"/>

define(["esri/map", "esri/layers/FeatureLayer", "dojo/domReady!"], function(Map, FeatureLayer) {
  var map = new Map("map", {
    center: [-118, 34.5],
    zoom: 8,
    basemap: "topo"
  });
});

 

 

Any idea to work around this problem?

Outcomes