Commit e427699e by niuxiaolin

stable-1

parent 8356a877
...@@ -125,12 +125,9 @@ export class MainComponent implements OnInit { ...@@ -125,12 +125,9 @@ export class MainComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
this.map = new window.BMap.Map(document.getElementById("baidu-map"), { this.map = new window.BMap.Map(("baidu-map"), {
centerAndZoom: { enableMapClick: true
lat: 37.78663390039693, });
lng: 112.43176242674386,
zoom: 10,
}});
(window as any).map=this.map; (window as any).map=this.map;
this.map.setMapStyleV2({ styleJson: theme }); this.map.setMapStyleV2({ styleJson: theme });
this.map.enableScrollWheelZoom(true); this.map.enableScrollWheelZoom(true);
...@@ -445,7 +442,10 @@ export class MainComponent implements OnInit { ...@@ -445,7 +442,10 @@ export class MainComponent implements OnInit {
//4. 给目标行政区划添加边框,其实就是给目标行政区划添加一个没有填充物的遮罩层 //4. 给目标行政区划添加边框,其实就是给目标行政区划添加一个没有填充物的遮罩层
var ply = new BMap.Polygon(rs.boundaries[0], {strokeWeight:0,strokeColor:"#16e8d6",fillColor:"",fillOpacity:"0"}); var ply = new BMap.Polygon(rs.boundaries[0], {strokeWeight:0,strokeColor:"#16e8d6",fillColor:"",fillOpacity:"0"});
this.map.addOverlay(ply); this.map.addOverlay(ply);
this.map.setViewport(ply.getPath());//调整视野 this.map.setViewport(ply.getPath(),{
enableAnimation:true,
delay:1000
});//调整视野
//获取行政区域 //获取行政区域
// map.clearOverlays(); //清除地图覆盖物 // map.clearOverlays(); //清除地图覆盖物
......
...@@ -304,7 +304,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 700); // 多1个像素点防止 ...@@ -304,7 +304,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 700); // 多1个像素点防止
var appkey = "29359046"; //综合安防管理平台提供的appkey,必填 var appkey = "29359046"; //综合安防管理平台提供的appkey,必填
var secret = setEncrypt("zRjsouOfWQQW5Yl4Ddgl"); //综合安防管理平台提供的secret,必填 var secret = setEncrypt("zRjsouOfWQQW5Yl4Ddgl"); //综合安防管理平台提供的secret,必填
// var ip = "192.168.19.175"; //综合安防管理平台IP地址,必填 // var ip = "192.168.19.175"; //综合安防管理平台IP地址,必填
var ip = "221.131.9.171"; //综合安防管理平台IP地址,必填 var ip = "221.131.9.172"; //综合安防管理平台IP地址,必填
var playMode = 0; //初始播放模式:0-预览,1-回放 var playMode = 0; //初始播放模式:0-预览,1-回放
var port = 1443; //综合安防管理平台端口,若启用HTTPS协议,默认443 var port = 1443; //综合安防管理平台端口,若启用HTTPS协议,默认443
var snapDir = "D:\\SnapDir"; //抓图存储路径 var snapDir = "D:\\SnapDir"; //抓图存储路径
......
...@@ -1072,19 +1072,19 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6"; ...@@ -1072,19 +1072,19 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
log: "center" log: "center"
}) })
} }
else if (a instanceof J && b) { else if (a instanceof Point && b) {
b = c.tn(b).zoom; b = c.tn(b).zoom;
c.Bc = c.Va || b; c.Bc = c.Va || b;
c.Va = b; c.Va = b;
e = c.pe; e = c.pe;
c.pe = new J(a.lng,a.lat); c.pe = new Point(a.lng,a.lat);
c.fc = c.Pc.bi(c.pe, c.Vb); c.fc = c.Pc.bi(c.pe, c.Vb);
c.NB = c.NB || c.Va; c.NB = c.NB || c.Va;
c.MB = c.MB || c.pe; c.MB = c.MB || c.pe;
var g = new Q("onload") var g = new Q("onload")
, i = new Q("onloadcode"); , i = new Q("onloadcode");
g.point = new J(a.lng,a.lat); g.point = new Point(a.lng,a.lat);
g.pixel = c.Rb(c.pe, c.Va); g.pixel = c.pointToPixel(c.pe, c.Va);
g.zoom = b; g.zoom = b;
c.loaded || (c.loaded = p, c.loaded || (c.loaded = p,
c.dispatchEvent(g), c.dispatchEvent(g),
...@@ -1201,12 +1201,12 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6"; ...@@ -1201,12 +1201,12 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
}, },
Ua: x("Ya"), Ua: x("Ya"),
pointToPixel: function(a, b) { pointToPixel: function(a, b) {
b = b || this.ka(); b = b || this.getZoom();
return this.Pc.Rb(a, b, this.fc, this.Hb(), this.Vb) return this.Pc.Rb(a, b, this.fc, this.getSize(), this.Vb)
}, },
pixelToPoint: function(a, b) { pixelToPoint: function(a, b) {
b = b || this.ka(); b = b || this.ka();
return this.Pc.Ib(a, b, this.fc, this.Hb(), this.Vb) return this.Pc.Ib(a, b, this.fc, this.getSize(), this.Vb)
}, },
pointToOverlayPixel: function(a, b) { pointToOverlayPixel: function(a, b) {
if (a) { if (a) {
...@@ -1310,18 +1310,18 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6"; ...@@ -1310,18 +1310,18 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
zoom: f zoom: f
} }
}, },
setViewport: function(a, b) { setViewport: function(view, viewportOptions) {
var c; var viewpoint;
c = a && a.center ? a : this.vs(a, b); viewpoint = view && view.center ? view : this.getViewport(view, viewportOptions);
var b = b || {} var viewportOptions1 = viewportOptions || {}
, e = b.delay || 200; , delay = viewportOptions1.delay || 200;
if (c.zoom === this.Va && b.enableAnimation !== t) { if (viewpoint.zoom === this.Va && viewportOptions1.enableAnimation !== t) {
var f = this; var _this = this;
setTimeout(function() { setTimeout(function() {
f.ji(c.center, { _this.ji(c.center, {
duration: 210 duration: 210
}) })
}, e) }, delay)
} else } else
this.Ed(c.center, c.zoom) this.Ed(c.center, c.zoom)
}, },
...@@ -1673,7 +1673,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6"; ...@@ -1673,7 +1673,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
this.Me(this.Ir)) : this.Tf(this.Ir) this.Me(this.Ir)) : this.Tf(this.Ir)
}, },
Nd: function() { Nd: function() {
var a = this.ka() >= this.U.bF && this.va() === Pa && 18 >= this.ka() var a = this.getZoom() >= this.U.bF && this.va() === Pa && 18 >= this.getZoom()
, b = t; , b = t;
try { try {
document.createElement("canvas").getContext("2d"), document.createElement("canvas").getContext("2d"),
...@@ -3395,7 +3395,8 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6"; ...@@ -3395,7 +3395,8 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
evalMoudle: function(moudleName, source) { evalMoudle: function(moudleName, source) {
var c = this.lb(moudleName); var c = this.lb(moudleName);
try { try {
// console.log(source);
eval(source) eval(source)
} catch (e) { } catch (e) {
return return
...@@ -4530,10 +4531,10 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6"; ...@@ -4530,10 +4531,10 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
z.R.aa(a.Zb)) z.R.aa(a.Zb))
}); });
a.addEventListener("movestart", function() { a.addEventListener("movestart", function() {
this.$g() && this.$g().bI() this.getInfoWindow() && this.getInfoWindow().bI()
}); });
a.addEventListener("moveend", function() { a.addEventListener("moveend", function() {
this.$g() && this.$g().RH() this.getInfoWindow() && this.getInfoWindow().RH()
}) })
}); });
nc.prototype.draw = function(a) { nc.prototype.draw = function(a) {
...@@ -5513,7 +5514,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6"; ...@@ -5513,7 +5514,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
}, },
ax: function() { ax: function() {
for (var a = this.map.va().$e, b = 0; b < a.length; b++) { for (var a = this.map.va().$e, b = 0; b < a.length; b++) {
var c = new Mc; var c = new TileLayer;
z.extend(c, a[b]); z.extend(c, a[b]);
this.mm.push(c); this.mm.push(c);
c.xa(this.map, this.An) c.xa(this.map, this.An)
...@@ -11024,7 +11025,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6"; ...@@ -11024,7 +11025,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
addTileLayer: mapPrototype.addTileLayer, addTileLayer: mapPrototype.addTileLayer,
removeTileLayer: mapPrototype.removeTileLayer, removeTileLayer: mapPrototype.removeTileLayer,
pixelToPoint: mapPrototype.Ib, pixelToPoint: mapPrototype.Ib,
pointToPixel: mapPrototype.Rb, pointToPixel: mapPrototype.pointToPixel,
setFeatureStyle: mapPrototype.J4, setFeatureStyle: mapPrototype.J4,
selectBaseElement: mapPrototype.C4, selectBaseElement: mapPrototype.C4,
setMapStyle: mapPrototype.setMapStyle, setMapStyle: mapPrototype.setMapStyle,
......
...@@ -10,5 +10,6 @@ var bmapcfg = { ...@@ -10,5 +10,6 @@ var bmapcfg = {
(function(){ (function(){
window.BMap_loadScriptTime = (new Date).getTime(); window.BMap_loadScriptTime = (new Date).getTime();
//加载地图API主文件 //加载地图API主文件
document.write('<script type="text/javascript" src="'+bmapcfg.home+'getscript.js"></script>'); // document.write('<script type="text/javascript" src="'+bmapcfg.home+'getscript.js"></script>');
document.write('<script type="text/javascript" src="'+bmapcfg.home+'orgingetscript.js"></script>');
})(); })();
ub.prototype.cancel = ia(1, function() {
this.pr && clearTimeout(this.pr);
this.fz = this.ju;
this.Nx = 0
});
D.We(function(a) {
if (!a.U || !a.U.Hs) {
a.fx() ? ig(a) : a.addEventListener("load", function() {
ig(this)
});
a.Tg = "\u4e2d\u56fd";
a.vr = "1";
var b = {
rC: p,
nb: function() {
b.rC && (b.rC = t, setTimeout(function() {
b.Mg()
}, 500))
},
Mg: function() {
var c = a.te(),
e = a.ka(),
f = S.Gb(c.Se()),
c = S.Gb(c.Lf());
Md.nb(function(c) {
9E3 <= c.current_city.code && 9378 >= c.current_city.code && (c.current_city.name = "\u53f0\u6e7e\u7701");
2E4 <= c.current_city.code && 20499 >= c.current_city.code && (c.current_city.name = "\u65b0\u52a0\u5761");
20500 <= c.current_city.code && 25999 >= c.current_city.code && (c.current_city.name = "\u6cf0\u56fd");
26E3 <= c.current_city.code && 29999 >= c.current_city.code && (c.current_city.name = "\u65e5\u672c");
3E4 <= c.current_city.code && 30999 >= c.current_city.code && (c.current_city.name = "\u97e9\u56fd");
31E3 <= c.current_city.code && 37E3 >= c.current_city.code && (c.current_city.name = "\u4e9a\u592a");
46609 <= c.current_city.code && 52505 >= c.current_city.code && (c.current_city.name = "\u6b27\u6d32");
39509 <= c.current_city.code && 53500 >= c.current_city.code && (c.current_city.name = "\u5357\u7f8e\u6d32");
54E3 <= c.current_city.code && 7E4 >= c.current_city.code && (c.current_city.name = "\u5317\u7f8e\u6d32");
54003 === c.current_city.code && (60731 <= c.current_city.code && 61123 >= c.current_city.code) && (c.current_city.name = "\u7f8e\u56fd");
if (54015 === c.current_city.code || 57970 <= c.current_city.code && 60223 >= c.current_city.code) c.current_city.name = "\u52a0\u62ff\u5927";
if (54025 === c.current_city.code || 54338 <= c.current_city.code && 57374 >= c.current_city.code) c.current_city.name = "\u58a8\u897f\u54e5";
b.rC = p;
if (c && c.current_city) {
var e = c.current_city.name,
f = c.current_city.code;
f !== a.vr && a.dispatchEvent("citychange", {
name: e,
code: f
});
a.Tg = e;
a.vr = c.current_city.code;
I() || jg(a)
}
}, {
qt: "cen",
b: f.lng + "," + f.lat + ";" + c.lng + "," + c.lat,
l: e
}, "", "", p)
}
};
a.addEventListener("load", function() {
b.nb()
});
a.addEventListener("moveend", function() {
b.nb()
});
a.addEventListener("zoomend", function() {
b.nb()
});
b.nb()
}
});
function ig(a) {
if (!a.$.NU) {
a.$.NU = p;
if (!a.bk) {
var b = new P(2, 2);
a.U.vJ = b;
I() && (b.width = 72, b.height = 0);
var c = new $b({
offset: b,
printable: p
});
a.bk = c
}
I() || (jg(a), a.addEventListener("maptypechange", function() {
jg(a)
}));
a.Mv(c);
var e = new kg;
e.m = {
vg: p
};
a.hY = e;
a.Mv(e);
a.addEventListener("resize", function() {
if (this.Hb().width >= 300 && a.Hb().height >= 100) {
e.show();
c.ie(a.U.vJ)
} else {
e.aa();
c.ie(new P(4, 2))
}
});
300 <= a.Hb().width && 100 <= a.Hb().height && a.U.gY ? e.show() : (e.aa(), c.ie(new P(4, 2)));
a.addEventListener("oncopyrightoffsetchange", function(b) {
a.hY.ie(b.target.fY);
a.bk.ie(b.target.UU)
});
a.dispatchEvent(new Q("hidecopyright"))
}
}
function jg(a) {
if (!a.bk) {
var b = new P(2, 2);
I() && (b.width = 72, b.height = 0);
b = new $b({
offset: b,
printable: p
});
a.bk = b
}
var c = a.Tg || "\u4e2d\u56fd",
b = a.va(),
e = "\u5e38\u5dde\u5e02 \u5357\u660c\u5e02 \u4e4c\u9c81\u6728\u9f50\u5e02 \u65e0\u9521\u5e02 \u798f\u5dde\u5e02 \u6cc9\u5dde\u5e02 \u73e0\u6d77\u5e02 \u8d35\u9633\u5e02".split(" "),
f = "\u5317\u4eac\u5e02 \u4e0a\u6d77\u5e02 \u5e7f\u5dde\u5e02 \u6df1\u5733\u5e02 \u5b81\u6ce2\u5e02 \u77f3\u5bb6\u5e84\u5e02 \u6c88\u9633\u5e02 \u957f\u6625\u5e02 \u9752\u5c9b\u5e02 \u6e29\u5dde\u5e02 \u53f0\u5dde\u5e02 \u91d1\u534e\u5e02 \u4f5b\u5c71\u5e02 \u4e2d\u5c71\u5e02 \u6606\u660e\u5e02 \u5357\u5b81\u5e02 \u82cf\u5dde\u5e02 \u897f\u5b89\u5e02 \u6d4e\u5357\u5e02 \u90d1\u5dde\u5e02 \u5408\u80a5\u5e02 \u547c\u548c\u6d69\u7279\u5e02 \u676d\u5dde\u5e02 \u6210\u90fd\u5e02 \u6b66\u6c49\u5e02 \u957f\u6c99\u5e02 \u5929\u6d25\u5e02 \u5357\u4eac\u5e02 \u91cd\u5e86\u5e02 \u5927\u8fde\u5e02 \u4e1c\u839e\u5e02 \u53a6\u95e8\u5e02".split(" "),
g = ["\u9999\u6e2f\u7279\u522b\u884c\u653f\u533a"],
i;
for (i in e)
if (e[i] === c) {
var k = p;
break
} for (i in f)
if (f[i] === c) break;
for (i in g)
if (g[i] === c) {
var m = p;
break
} if ("\u53f0\u6e7e\u7701" === c) var n = p;
if ("\u65b0\u52a0\u5761" === c) var o = p;
if ("\u65e5\u672c" === c) var q = p;
if ("\u97e9\u56fd" === c) var v = p;
if ("\u6cf0\u56fd" === c) var w = p;
if ("\u4e9a\u592a" === c) var y = p;
if ("\u6b27\u6d32" === c) var A = p;
if ("\u5357\u7f8e\u6d32" === c) var B = p;
if ("\u5317\u7f8e\u6d32" === c) var C = p;
if ("\u7f8e\u56fd" === c) var F = p;
if ("\u52a0\u62ff\u5927" === c) var E = p;
if ("\u58a8\u897f\u54e5" === c) var G = p;
i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "];
c = "rgba(255, 255, 255, 0.701961)";
9 >= a.ka() ? i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "] : n ? i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "] : q || v ? i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "] : o || w ? i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "] : y ? i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "] : A ? i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "] : B ? i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "] : C && (i = ["&copy;&nbsp;2019 Baidu - GS(2018)5572\u53f7 - \u7532\u6d4b\u8d44\u5b571100930 - \u4eacICP\u8bc1030173\u53f7 - Data &copy; "]);
if (9 >= a.ka()) {
i.push("\u957f\u5730\u4e07\u65b9");
i.push(' &amp; <a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');
i.push(' &amp; <a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');
if (b === ab || b === Va) i.push(' &amp; <a target="_blank" href="http://www.eso.org/public/">ESO</a>'), c = "rgba(0,0,0,.7)";
b === Sa && (i.push(' &amp; <a href="http://o.cn" target="_blank" style="color:#fff;font-size: 11px;">\u90fd\u5e02\u5708</a>'), c = "none")
} else if (q || v) i.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>');
else if (o || w) i.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>');
else if (y) i.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>'), i.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>');
else if (A) i.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>'), i.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>');
else if (B) i.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>'), i.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>');
else if (F || G || E) i.push('<a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>'), i.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>');
else if (C) i.push('<a target="_blank" href="http://www.openstreetmap.org/">OpenStreetMap</a>'), i.push(' &amp; <a target="_blank" href="https://www.mapbox.com/">Mapbox</a>');
else {
i.push("\u957f\u5730\u4e07\u65b9");
k && i.push(' &amp; <a target="_blank" href="http://www.palmcity.cn/palmcity/">PalmCity</a>');
m && i.push(' &amp; <a target="_blank" href="http://www.mapking.com/HongKong/eng/home/MapKing_Webmap.html">MapKing</a>');
n && (i.push(' &amp; <a target="_blank" href="http://corporate.navteq.com/supplier_terms.html">HERE</a>'), i.push(' &amp; <a target="_blank" href="http://www.localking.com.tw/about/localking.aspx">\u6a02\u5ba2LocalKing</a>'));
if (b === ab || b === Va) c = "rgba(0,0,0,.7)";
b === Sa && (i.push(' &amp; <a href="http://o.cn" target="_blank" style="color:#fff;font-size: 11px;">\u90fd\u5e02\u5708</a>'), c = "none")
}
i.unshift('<span style="background: ' + c + ';padding: 0px 1px;line-height: 16px;display: inline;height: 16px;">');
i.push("</span>");
i = i.join("");
a.bk.Nv({
id: 1,
content: i
})
}
function kg() {
this.defaultAnchor = Yb;
this.defaultOffset = new P(1, 20);
I() && (this.defaultOffset = new P(1, 1));
this.Hy = 30;
this.au = H.sa + (I() ? "copyright_logo_s.png" : "copyright_logo.png")
}
kg.prototype = new Ub;
kg.prototype.initialize = function(a) {
this.M = a;
var b = O("div");
b.style.height = "32px";
var c = O("a", {
title: "\u5230\u767e\u5ea6\u5730\u56fe\u67e5\u770b\u6b64\u533a\u57df",
target: "_blank",
href: "http://map.baidu.com/?sr=1"
});
c.style.outline = "none";
c.innerHTML = 6 === z.ga.ma ? "<div style='cursor:pointer;width:77px;height:32px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.au + ")'></div>" : "<img style='border:none;width:77px;height:32px' src='" + this.au + "' />";
I() && (1 < window.devicePixelRatio && (this.au = H.sa + "copyright_logo_hd.png"), b.style.height = "25px", c.href = "http://map.baidu.com/?sr=1", c.innerHTML = "<img style='border:none;width:68px;height:25px' src='" + this.au + "' />");
b.appendChild(c);
a.Ua().appendChild(b);
return b
};
z.extend(Oa.prototype, {
jb: function() {
this.fa()
},
fa: function() {
var a = this;
a.Sn = function() {
var b = a.Hb();
if (a.width != b.width || a.height != b.height) {
var c = new P(a.width, a.height),
e = new Q("onbeforeresize");
e.size = c;
a.dispatchEvent(e);
a.Wj((b.width - a.width) / 2, (b.height - a.height) / 2);
a.xe.style.width = (a.width = b.width) + "px";
a.xe.style.height = (a.height = b.height) + "px";
c = new Q("onresize");
c.size = b;
a.dispatchEvent(c);
b = parseInt(a.platform.style.left) || 0;
c = parseInt(a.platform.style.top) || 0;
0 != a.Wa && (a.offsetX != b || a.offsetY != c) && a.Je(b, c)
}
};
a.U.Xr && !a.$.Jl && (a.$.Jl = setInterval(a.Sn, 80));
I() || (z.V(a.xe, "mouseover", function(b) {
Db(b);
a.dispatchEvent(new Q("onmouseover"))
}), z.V(a.xe, "mouseout", function(b) {
Db(b);
a.dispatchEvent(new Q("onmouseout"))
}))
},
Je: function(a, b, c, e) {
if (!isNaN(a) && !isNaN(b) && !(this.offsetX == a && this.offsetY == b)) {
var f = this.va(),
g = f.m.fb,
i = this.offsetY - b,
f = f.dc(this.Va),
k = s,
k = this.fc ? this.fc : this.Pc.bi(this.pe),
m = new J(k.lng + (this.offsetX - a) * f, k.lat - (this.offsetY - b) * f);
m.lat - this.height / 2 * f <= g.Xd && 0 <= i && (b = g.Xd + this.height / 2 * f, b = this.offsetY - (k.lat - b) / f);
m.lat + this.height / 2 * f > g.Vd && 0 > i && (b = g.Vd - this.height / 2 * f, b = this.offsetY - (k.lat - b) / f);
this.Wj(this.offsetX - a, this.offsetY - b, c);
a = Math.round(a);
b = Math.round(b);
this.offsetX = a;
this.offsetY = b;
this.platform.style.left = a + "px";
this.platform.style.top = b + "px";
this.xe.style.left = -a + "px";
this.xe.style.top = -b + "px";
e != t && this.dispatchEvent(new Q("onmoving"))
}
},
ji: function(a, b) {
if (a instanceof J) {
var c = this.Rb(a),
e = Math.round(this.width / 2),
f = Math.round(this.height / 2),
b = b || {};
Math.abs(e - c.x) > this.width || Math.abs(f - c.y) > this.height || b.noAnimation ? this.DH(e - c.x, f - c.y, a) : this.pl(e - c.x, f - c.y, {
duration: b.duration
})
}
},
DH: function(a, b, c) {
var e = this.$;
e.Ic != p && (e.qb && e.qb.stop(), this.dispatchEvent(new Q("onmovestart")), this.Je(this.offsetX + a, this.offsetY + b, c), this.dispatchEvent(new Q("onmoveend")))
},
tg: function(a, b, c) {
a = Math.round(a) || 0;
b = Math.round(b) || 0;
c = c || {};
Math.abs(a) <= this.width && Math.abs(b) <= this.height && !c.noAnimation ? this.pl(a, b) : this.DH(a, b)
},
pl: function(a, b, c) {
if (this.$.Ic != p) {
c = c || {};
this.dispatchEvent(new Q("onmovestart"));
var e = this,
f = e.$;
f.Ex = e.offsetX;
f.o = e.offsetY;
f.SE && f.SE.cancel();
f.qb && f.qb.stop();
f.SE = new ub({
Hc: c.Hc || e.U.Hc,
duration: c.duration || e.U.HT,
$b: c.$b || vb.gC,
za: function(c) {
(this.NE = e.$.Ic) || e.Je(f.Ex + Math.ceil(a * c), f.o + Math.ceil(b * c))
},
finish: function() {
e.dispatchEvent(new Q("onmoveend"));
e.$.SE = t;
e.$.oi == p && (e.$.oi = t, 0 != e.$.mc && e.hb())
}
})
}
},
JK: function(a, b) {
var c = this.va();
if ("object" != typeof c) return s;
c = this.U.uo ? this.Bd.Id(b) * c.dc(b) : 256 * c.dc(b);
a = S.Gb(a);
return {
Am: parseInt(a.lng / c),
yr: parseInt(a.lat / c),
pg: b
}
}
});
U(Af, {
panTo: Af.ji,
panBy: Af.tg
});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
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