Commit e427699e by niuxiaolin

stable-1

parent 8356a877
......@@ -125,12 +125,9 @@ export class MainComponent implements OnInit {
}
ngOnInit(): void {
this.map = new window.BMap.Map(document.getElementById("baidu-map"), {
centerAndZoom: {
lat: 37.78663390039693,
lng: 112.43176242674386,
zoom: 10,
}});
this.map = new window.BMap.Map(("baidu-map"), {
enableMapClick: true
});
(window as any).map=this.map;
this.map.setMapStyleV2({ styleJson: theme });
this.map.enableScrollWheelZoom(true);
......@@ -445,7 +442,10 @@ export class MainComponent implements OnInit {
//4. 给目标行政区划添加边框,其实就是给目标行政区划添加一个没有填充物的遮罩层
var ply = new BMap.Polygon(rs.boundaries[0], {strokeWeight:0,strokeColor:"#16e8d6",fillColor:"",fillOpacity:"0"});
this.map.addOverlay(ply);
this.map.setViewport(ply.getPath());//调整视野
this.map.setViewport(ply.getPath(),{
enableAnimation:true,
delay:1000
});//调整视野
//获取行政区域
// map.clearOverlays(); //清除地图覆盖物
......
......@@ -304,7 +304,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 700); // 多1个像素点防止
var appkey = "29359046"; //综合安防管理平台提供的appkey,必填
var secret = setEncrypt("zRjsouOfWQQW5Yl4Ddgl"); //综合安防管理平台提供的secret,必填
// 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 port = 1443; //综合安防管理平台端口,若启用HTTPS协议,默认443
var snapDir = "D:\\SnapDir"; //抓图存储路径
......
......@@ -1072,19 +1072,19 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
log: "center"
})
}
else if (a instanceof J && b) {
else if (a instanceof Point && b) {
b = c.tn(b).zoom;
c.Bc = c.Va || b;
c.Va = b;
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.NB = c.NB || c.Va;
c.MB = c.MB || c.pe;
var g = new Q("onload")
, i = new Q("onloadcode");
g.point = new J(a.lng,a.lat);
g.pixel = c.Rb(c.pe, c.Va);
g.point = new Point(a.lng,a.lat);
g.pixel = c.pointToPixel(c.pe, c.Va);
g.zoom = b;
c.loaded || (c.loaded = p,
c.dispatchEvent(g),
......@@ -1201,12 +1201,12 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
},
Ua: x("Ya"),
pointToPixel: function(a, b) {
b = b || this.ka();
return this.Pc.Rb(a, b, this.fc, this.Hb(), this.Vb)
b = b || this.getZoom();
return this.Pc.Rb(a, b, this.fc, this.getSize(), this.Vb)
},
pixelToPoint: function(a, b) {
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) {
if (a) {
......@@ -1310,18 +1310,18 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
zoom: f
}
},
setViewport: function(a, b) {
var c;
c = a && a.center ? a : this.vs(a, b);
var b = b || {}
, e = b.delay || 200;
if (c.zoom === this.Va && b.enableAnimation !== t) {
var f = this;
setViewport: function(view, viewportOptions) {
var viewpoint;
viewpoint = view && view.center ? view : this.getViewport(view, viewportOptions);
var viewportOptions1 = viewportOptions || {}
, delay = viewportOptions1.delay || 200;
if (viewpoint.zoom === this.Va && viewportOptions1.enableAnimation !== t) {
var _this = this;
setTimeout(function() {
f.ji(c.center, {
_this.ji(c.center, {
duration: 210
})
}, e)
}, delay)
} else
this.Ed(c.center, c.zoom)
},
......@@ -1673,7 +1673,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
this.Me(this.Ir)) : this.Tf(this.Ir)
},
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;
try {
document.createElement("canvas").getContext("2d"),
......@@ -3395,7 +3395,8 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
evalMoudle: function(moudleName, source) {
var c = this.lb(moudleName);
try {
// console.log(source);
eval(source)
} catch (e) {
return
......@@ -4530,10 +4531,10 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
z.R.aa(a.Zb))
});
a.addEventListener("movestart", function() {
this.$g() && this.$g().bI()
this.getInfoWindow() && this.getInfoWindow().bI()
});
a.addEventListener("moveend", function() {
this.$g() && this.$g().RH()
this.getInfoWindow() && this.getInfoWindow().RH()
})
});
nc.prototype.draw = function(a) {
......@@ -5513,7 +5514,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
},
ax: function() {
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]);
this.mm.push(c);
c.xa(this.map, this.An)
......@@ -11024,7 +11025,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
addTileLayer: mapPrototype.addTileLayer,
removeTileLayer: mapPrototype.removeTileLayer,
pixelToPoint: mapPrototype.Ib,
pointToPixel: mapPrototype.Rb,
pointToPixel: mapPrototype.pointToPixel,
setFeatureStyle: mapPrototype.J4,
selectBaseElement: mapPrototype.C4,
setMapStyle: mapPrototype.setMapStyle,
......
......@@ -10,5 +10,6 @@ var bmapcfg = {
(function(){
window.BMap_loadScriptTime = (new Date).getTime();
//加载地图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>');
})();
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