代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<script>
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
function loadScript(url, callback) {
var script = document.createElement("script")
script.type = "text/javascript";
if (script.readyState) { //IE
script.onreadystatechange = function () {
if (script.readyState == "loaded" || script.readyState == "complete") {
script.onreadystatechange = null;
callback();
}
};
} else { //Others
script.onload = function () {
callback();
};
}
script.src = url;
document.querySelector("head").appendChild(script);
}
function openFile(url) {
var reader = new FileReader();
reader.onload = function () {
if (reader.result) {
debugger
//显示文件内容
$("#output").html(reader.result);
}
};
reader.readAsText(url);
};
function injectKey(key) {
L.esri.DynamicMapLayer.include({
_requestExport: function (params, bounds) {
if (key) {
params.app_key = key;
}
if (this.options.f === 'json') {
this.service.request(
'export',
params,
function (error, response) {
if (error) {
return;
}
if (this.options.token && response.href) {
response.href += '?token=' + this.options.token;
}
if (this.options.proxy && response.href) {
response.href = this.options.proxy + '?' + response.href;
}
if (response.href) {
this._renderImage(response.href, bounds);
} else {
this._renderImage(response.imageData, bounds, response.contentType);
}
},
this
);
} else {
params.f = 'image';
this._renderImage(this.options.url + 'export' + L.Util.getParamString(params), bounds);
}
}
});
L.TileLayer.addInitHook(function () {
if (key && this.tileUrl.indexOf('app_key') === -1) {
this.tileUrl += '?app_key=' + key;
}
});
}
window.onload = function () {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.responseText);
document.write(xhr.responseText)
debugger
}
};
xhr.open(
"get",
"http://192.168.179.71:8000/public/static/zz-leaflet/zz-leaflet.min.js",
true
);
xhr.send();
};
</script>
</head>
<body>
<div class="body"></div>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。