更新时间:2023-02-05 15:42:48
.ajax({
type:' 获取,
url:' json_PointList2.json ' ,
dataType:' json ' ,
data:{},
crossDomain:true,
success:function(results) ){
console.log('成功!' );
调试器;
polylineJson2 = results;
},
错误:函数(xhr,状态,错误){
debugger;的console.log(误差);
}
});
.ajax ( { type:'Get", url:'json_PointList2.json', dataType:'json', data:{}, crossDomain : true, success:function(results) { console.log('Success!'); debugger; polylineJson2 = results; }, error: function(xhr, status, error) { debugger; console.log(error); } } );
这是猜测。可能在代码中缺少redy()方法。尝试如下。
This is a guess.May be missing redy() method in your code.Try is as below.
<script type="text/javascript">
(document).ready(function( ){
var polylineJson2;
(document).ready(function() { var polylineJson2;