Commit 63590d6c by niuxiaolin

latest ui 08/08/2019 19:20:33

parent 74c97dd6
......@@ -273,11 +273,18 @@ export class MainComponent implements OnInit {
var view = this.map.getViewport(points,{enableAnimation:true,delay:2000});
this.map.panTo(view.center,{duration:1000});
setTimeout(() => {
// this.m.dispatchWheelEvent_Chrome(document.getElementById("baidu-map"),500);
this.map.centerAndZoom(view.center,view.zoom);
//this.map.dispatchWheelEvent_Chrome
}, 1000);
timer(0, 200)
.pipe(timeInterval(), pluck('interval'), take(6)).subscribe((index:any)=>{
// this.m.dispatchWheelEvent_Chrome(document.getElementById("baidu-map"),index*10);
}
);
// setTimeout(() => {
// this.m.dispatchWheelEvent_Chrome(document.getElementById("baidu-map"),50);
// this.map.centerAndZoom(view.center,view.zoom);
// //this.map.dispatchWheelEvent_Chrome
// }, 1000);
}
......
......@@ -12,7 +12,15 @@ export class SelfMapService {
}
dispatchWheelEvent_Chrome($el, delta:Number) {
var evt = document.createEvent("MouseEvents") as any;
var width = document.body.getClientRects()[0].width/2;
var height = document.body.getClientRects()[0].height/2;
evt.initEvent('mousewheel', true, true,window.screen.width,window.screen.height, width,height);
evt.wheelDelta = delta;
$el.dispatchEvent(evt);
}
/**
* 转换为平滑点
* @param points 点
......
......@@ -2147,8 +2147,10 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
jO: new P(24,36),
iO: new P(12,36),
jF: new P(13,1),
sa: D.oa + "images/",
m3: "http://api0.map.bdimg.com/images/",
// sa: D.oa + "images/",
sa:"assets/images/",
// m3: "http://api0.map.bdimg.com/images/",
m3: "assets/images/",
kF: D.oa + "images/markers_new.png",
gO: 24,
hO: 73,
......@@ -7556,27 +7558,27 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
this.M = a;
this.Bv = b;
this.Vc = b.JM;
// this.$a = {
// o_: "na",
// zIndex: 0,
// zN: c.tileUrls || {
// http: ["http://online0.map.bdimg.com/pvd/?qt=vtile", "http://online1.map.bdimg.com/pvd/?qt=vtile", "http://online2.map.bdimg.com/pvd/?qt=vtile", "http://online3.map.bdimg.com/pvd/?qt=vtile", "http://online4.map.bdimg.com/pvd/?qt=vtile"],
// https: ["https://ss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile", "https://ss1.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile", "https://ss2.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile", "https://ss3.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile", "https://ss0.bdstatic.com/8bo_dTSlQ1gBo1vgoIiO_jowehsv/pvd/?qt=vtile"]
// },
// oD: c.iconUrls || ["https://ss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/sty/map_icons2x/", "https://ss1.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/sty/map_icons2x/"],
// DE: p
// };
this.$a = {
this.$a = {
o_: "na",
zIndex: 0,
originUrl:"http://online0.map.bdimg.com/pvd/?qt=vtile",
zN: c.tileUrls || {
http: ["https://localhost/baidu/getJson"],
https: ["https://localhost/baidu/getJson"]
http: ["http://online0.map.bdimg.com/pvd/?qt=vtile", "http://online1.map.bdimg.com/pvd/?qt=vtile", "http://online2.map.bdimg.com/pvd/?qt=vtile", "http://online3.map.bdimg.com/pvd/?qt=vtile", "http://online4.map.bdimg.com/pvd/?qt=vtile"],
https: ["https://ss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile", "https://ss1.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile", "https://ss2.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile", "https://ss3.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/pvd/?qt=vtile", "https://ss0.bdstatic.com/8bo_dTSlQ1gBo1vgoIiO_jowehsv/pvd/?qt=vtile"]
},
oD: c.iconUrls || ["https://ss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/sty/map_icons2x/", "https://ss1.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/sty/map_icons2x/"],
DE: p
};
// this.$a = {
// o_: "na",
// zIndex: 0,
// originUrl:"http://online0.map.bdimg.com/pvd/?qt=vtile",
// zN: c.tileUrls || {
// http: ["https://localhost/baidu/getJson"],
// https: ["https://localhost/baidu/getJson"]
// },
// oD: c.iconUrls || ["https://ss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/sty/map_icons2x/", "https://ss1.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv/sty/map_icons2x/"],
// DE: p
// };
this.XA = "";
this.SR = {};
var c = c.urlOpts || {
......@@ -7848,7 +7850,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
, q = q + a.XA + "v=" + w + "&udt=" + v + "&fn=window." + y
, w = n[o] + "&" + q
, w = n[o] + "/" + window.encodeURIComponent(Kb(q));
, w = n[o] + "&param=" + window.encodeURIComponent(Kb(q));
window[y] = function(a) {
clearTimeout(i[g].Ik);
i[g] = s;
......@@ -7910,6 +7912,14 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
}
;
pa(w);
//xiaolin
//改为异步方式处理数据
// httpGetAsync(w,function(body){
// eval(JSON.parse(body).data)
// })
//改为异步请求
i[g].status = "loading";
k = a;
i[g].Ik = setTimeout(function() {
......@@ -8152,9 +8162,14 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
, c = Gd[c];
this.map.Yw() && (g = 2);
e = this.map.oh.Uv(e, b).Ol;
console.log( (Fd[Math.abs(e + a) % Fd.length] + "?qt=vtile&x=" + (e + "").replace(/-/gi, "M") + "&y=" + (a + "").replace(/-/gi, "M") + "&z=" + b + "&styles=" + c + "&scaler=" + g + (6 == z.ga.ma ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1"))
var orginUrl= (Fd[Math.abs(e + a) % Fd.length] + "?qt=vtile&x=" + (e + "").replace(/-/gi, "M") + "&y=" + (a + "").replace(/-/gi, "M") + "&z=" + b + "&styles=" + c + "&scaler=" + g + (6 == z.ga.ma ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1")
tdir = bmapcfg.tiles_dir.length>0?bmapcfg.tiles_dir:bmapcfg.home + "maptile";
return tdir + "/" + b + "/" + e + "/" + a + bmapcfg.imgext; // 使用本地的瓦片
httpGetAsync("https://localhost/baidu/isfile/"+e+"/"+a+"/"+b+"/"+c,function(){
})
return tdir + "/" + b + "/" + a+ "/" + e + bmapcfg.imgext; // 使用本地的瓦片
// return "https://localhost/baidu/isfile/"+e+"/"+a+"/"+b+"/"+c;
}
;
var Pa = new Dd("\u5730\u56fe",Hd,{
......@@ -11439,3 +11454,14 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
D.S_();
}
)()
function httpGetAsync(theUrl, callback)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
callback(xmlHttp.responseText);
}
xmlHttp.open("GET", theUrl, true); // true for asynchronous
xmlHttp.send(null);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment