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>');
})(); })();
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