// (function() { // window.BMap_loadScriptTime = (new Date).getTime(); // window.BMap = window.BMap || {}; // window.BMap.apiLoad = function () { // delete window.BMap.apiLoad; // }; // // let s = document.createElement('script'); // // s.src = '/static/map/map.js'; // // document.body.appendChild(s); // }) // (); var url = window.location.origin var bmapcfg = { imgext: ".jpg", //瓦片图的后缀 根据需要修改,一般是 .png .jpg tiles_dir: url + "/tiles/", //普通瓦片图的地址,为空默认在tiles/ 目录 //tiles_dir: "http://www.jibei.com:8089/tiles/", }; var scripts = document.getElementsByTagName("script"); var JS__FILE__ = scripts[scripts.length - 1].getAttribute("src"); //获得当前js文件路径 bmapcfg.home = JS__FILE__.substr(0, JS__FILE__.lastIndexOf("/") + 1); //地图API主目录