能否使用requireJS 2.1.14加载arcgis javascript api 3.10

能否使用requireJS 2.1.14加载arcgis javascript api 3.10
问题描述 如题使用requireJS 代替 Dojo Loader加载arcgis javascript api,能加载大多数模
块,但是也有错误出现,请问这两者间能兼容么?


$(function(){

require.config(
{
paths:
{
dojo:
http://10.4.148.145/libs/arcgi ... /dojo,
dijit:
http://10.4.148.145/libs/arcgi ... dijit,
dojox:
http://10.4.148.145/libs/arcgi ... dojox,
esri:
http://10.4.148.145/libs/arcgi ... /esri
}
});

var map;

require([dojo/parser, esri/map,
esri/layers/ArcGISTiledMapServiceLayer],
function (parser, Map, ArcGISTiledMapServiceLayer)
{
map = new Map(map);

var layer = new
ArcGISTiledMapServiceLayer(http://10.4.148.5:6080/arcgis/ ... yrgp_
dx_ly/MapServer);
map.addLayer(layer);
});
});


提示如下错误:
Error: Load timeout for modules:
dojox/gfx/renderer!_unnormalized7,dojox/gfx/renderer!,dojox/gfx/silverlight,dijit/
_base/manager,dijit/_base http://requirejs.org/docs/errors.html#timeout
error source line:


throw err;
附件
提交时间2014-08-11
用户名
已邀请:

徐鸿至

赞同来自:

【解决办法】:
目前不是完美兼容的,可以参考以下两个帖子: https://geonet.esri.com/thread/102952 https://github.com/tomwayson/esri-require-js

本地测试的结果也是不能加载,是由于requirejs 和dojo的兼容性问题,导致js api与requirejs不兼容的http://stackoverflow.com/quest ... 1-9-1

美国确认requirejs 和js api 不兼容: I heard back from development. They said the conflict between our API and RequireJS is a known issue and this will be fixed in future. They currently have no timetable for when this issue will be fixed.

要回复问题请先登录注册