下面这段代码调用arcgis API for JavaScript地图怎么不显示,只有个框?


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>map</title>
<link rel="stylesheet" type="text/css"
href="http://localhost/arcgis_js_api ... gt%3B
<link rel="stylesheet" type="text/css"
24
href="http://localhost/arcgis_js_api ... ot%3B />
<script type="text/javascript"
src="http://localhost/arcgis_js_api ... gt%3B
<script src="dojo/jsapi_vsdoc10_v33.js" type="text/javascript"></script>
<style type="text/css">
.MapClass
{ width:900px;
height:600px;
border:1px solid #000;
}
</style>
<script type="text/javascript">
dojo.require("esri.map");
dojo.addOnLoad(function ()
{
var MyMap = new esri.Map("MyMapDiv");
var MyTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer
("http://www.arcgisonline.cn/Arc ... 6quot;);
MyMap.addLayer(MyTiledMapServiceLayer)
}
)
</script>
</head>
<body class="tundra"></body>
</html>
已邀请:

陈伟东

赞同来自:

是引用在线的API吗?你把全部的代码贴出来

江民彬

赞同来自:

你这有代码调试都不行,其他没有代码的人,,更没有办法了。囧。
 
建议两个:
 
1. 自己尝试解决的话,用浏览器的控制台看看啥错误?
 
2. 上传html页面,等着其他人帮你解决吧。
 
然后看你这个代码,感觉api的版本较早,参考新版里面的sample吧 :js.arcgis.com
 
 

要回复问题请先登录注册