through the following code
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<style type="text/css">
html,body{
width:100%;
height:100%;
}
*{
margin:0px;
padding:0px;
}
body, button, input, select, textarea {
font: 12px/16px Verdana, Helvetica, Arial, sans-serif;
}
p{
width:603px;
padding-top:3px;
overflow:hidden;
}
.btn{
width:142px;
}
-sharpcontainer{
min-width:600px;
min-height:767px;
}
</style>
<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp&key=WQCBZ-4FF3F-WI4JL-NJGAX-MECTJ-GMFWA"></script>
<script src="./jquery-3.3.1.min.js"></script>
<script>
window.onload = function(){
//
// init
function init() {
//map qq.maps.Map()
var map = new qq.maps.Map(document.getElementById("container"), {
center: new qq.maps.LatLng(39.916527,116.397128), //
zoom:8 //
});
}
init();
var url="http://apis.map.qq.com/uri/v1/routeplan?type=bus&fromcoord=39.980683,116.302&tocoord=39.9836,116.3164&policy=1&referer=WQCBZ-4FF3F-WI4JL-NJGAX-MECTJ-GMFWA&output=jsonp";
$.ajax({
"type" : "get",
"dataType" : "jsonp",
"processData" : false,
"async" : false,
"global" : false,
"url" : url,
"timeout" : 1000*30,
"success" : function(data) {
console.log(data);
},
"error":function() {
console.log("");
},
complete:function() {
}
});
}
</script>
</head>
<body>
<!-- -->
<div id="container"></div>
</body>
</html>
the path planning returned by the query that wants to return the map, but after running, the console will report an error
it seems that there is an error in ajax. How can I get it correctly?