commit
769dfdc659
@ -0,0 +1,335 @@
|
|||||||
|
var BMap = window.BMap
|
||||||
|
var BMapLib = (window.BMapLib = BMapLib || {})
|
||||||
|
;(function () {
|
||||||
|
var b = function (m, l, j) {
|
||||||
|
l = d(l)
|
||||||
|
var n = m.pointToPixel(l.getNorthEast())
|
||||||
|
var i = m.pointToPixel(l.getSouthWest())
|
||||||
|
n.x += j
|
||||||
|
n.y -= j
|
||||||
|
i.x -= j
|
||||||
|
i.y += j
|
||||||
|
var h = m.pixelToPoint(n)
|
||||||
|
var k = m.pixelToPoint(i)
|
||||||
|
return new BMap.Bounds(k, h)
|
||||||
|
}
|
||||||
|
var d = function (i) {
|
||||||
|
var k = f(i.getNorthEast().lng, -180, 180)
|
||||||
|
var h = f(i.getSouthWest().lng, -180, 180)
|
||||||
|
var j = f(i.getNorthEast().lat, -74, 74)
|
||||||
|
var l = f(i.getSouthWest().lat, -74, 74)
|
||||||
|
return new BMap.Bounds(new BMap.Point(h, l), new BMap.Point(k, j))
|
||||||
|
}
|
||||||
|
var f = function (j, k, h) {
|
||||||
|
k && (j = Math.max(j, k))
|
||||||
|
h && (j = Math.min(j, h))
|
||||||
|
return j
|
||||||
|
}
|
||||||
|
var a = function (h) {
|
||||||
|
return '[object Array]' === Object.prototype.toString.call(h)
|
||||||
|
}
|
||||||
|
var c = function (l, n) {
|
||||||
|
var j = -1
|
||||||
|
if (a(n)) {
|
||||||
|
if (n.indexOf) {
|
||||||
|
j = n.indexOf(l)
|
||||||
|
} else {
|
||||||
|
for (var k = 0, h; (h = n[k]); k++) {
|
||||||
|
if (h === l) {
|
||||||
|
j = k
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return j
|
||||||
|
}
|
||||||
|
var e = (BMapLib.MarkerClusterer = function (l, h) {
|
||||||
|
if (!l) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this._map = l
|
||||||
|
this._markers = []
|
||||||
|
this._clusters = []
|
||||||
|
var k = h || {}
|
||||||
|
this._gridSize = k.gridSize || 60
|
||||||
|
this._maxZoom = k.maxZoom || 18
|
||||||
|
this._minClusterSize = k.minClusterSize || 2
|
||||||
|
this._isAverageCenter = false
|
||||||
|
if (k.isAverageCenter != undefined) {
|
||||||
|
this._isAverageCenter = k.isAverageCenter
|
||||||
|
}
|
||||||
|
this._styles = k.styles || []
|
||||||
|
var j = this
|
||||||
|
this._map.addEventListener('zoomend', function () {
|
||||||
|
j._redraw()
|
||||||
|
})
|
||||||
|
this._map.addEventListener('moveend', function () {
|
||||||
|
j._redraw()
|
||||||
|
})
|
||||||
|
var i = k.markers
|
||||||
|
a(i) && this.addMarkers(i)
|
||||||
|
})
|
||||||
|
e.prototype.addMarkers = function (k) {
|
||||||
|
for (var j = 0, h = k.length; j < h; j++) {
|
||||||
|
this._pushMarkerTo(k[j])
|
||||||
|
}
|
||||||
|
this._createClusters()
|
||||||
|
}
|
||||||
|
e.prototype._pushMarkerTo = function (h) {
|
||||||
|
var i = c(h, this._markers)
|
||||||
|
if (i === -1) {
|
||||||
|
h.isInCluster = false
|
||||||
|
this._markers.push(h)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e.prototype.addMarker = function (h) {
|
||||||
|
this._pushMarkerTo(h)
|
||||||
|
this._createClusters()
|
||||||
|
}
|
||||||
|
e.prototype._createClusters = function () {
|
||||||
|
var j = this._map.getBounds()
|
||||||
|
var l = b(this._map, j, this._gridSize)
|
||||||
|
for (var k = 0, h; (h = this._markers[k]); k++) {
|
||||||
|
if (!h.isInCluster && l.containsPoint(h.getPosition())) {
|
||||||
|
this._addToClosestCluster(h)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e.prototype._addToClosestCluster = function (l) {
|
||||||
|
var p = 4000000
|
||||||
|
var n = null
|
||||||
|
// var k = l.getPosition()
|
||||||
|
for (var m = 0, j; (j = this._clusters[m]); m++) {
|
||||||
|
var h = j.getCenter()
|
||||||
|
if (h) {
|
||||||
|
var o = this._map.getDistance(h, l.getPosition())
|
||||||
|
if (o < p) {
|
||||||
|
p = o
|
||||||
|
n = j
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (n && n.isMarkerInClusterBounds(l)) {
|
||||||
|
n.addMarker(l)
|
||||||
|
} else {
|
||||||
|
// eslint-disable-next-line
|
||||||
|
var j = new g(this)
|
||||||
|
j.addMarker(l)
|
||||||
|
this._clusters.push(j)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e.prototype._clearLastClusters = function () {
|
||||||
|
for (var j = 0, h; (h = this._clusters[j]); j++) {
|
||||||
|
h.remove()
|
||||||
|
}
|
||||||
|
this._clusters = []
|
||||||
|
this._removeMarkersFromCluster()
|
||||||
|
}
|
||||||
|
e.prototype._removeMarkersFromCluster = function () {
|
||||||
|
for (var j = 0, h; (h = this._markers[j]); j++) {
|
||||||
|
h.isInCluster = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e.prototype._removeMarkersFromMap = function () {
|
||||||
|
for (var j = 0, h; (h = this._markers[j]); j++) {
|
||||||
|
h.isInCluster = false
|
||||||
|
this._map.removeOverlay(h)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
e.prototype._removeMarker = function (h) {
|
||||||
|
var i = c(h, this._markers)
|
||||||
|
if (i === -1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this._map.removeOverlay(h)
|
||||||
|
this._markers.splice(i, 1)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
e.prototype.removeMarker = function (h) {
|
||||||
|
var i = this._removeMarker(h)
|
||||||
|
if (i) {
|
||||||
|
this._clearLastClusters()
|
||||||
|
this._createClusters()
|
||||||
|
}
|
||||||
|
return i
|
||||||
|
}
|
||||||
|
e.prototype.removeMarkers = function (l) {
|
||||||
|
var k = false
|
||||||
|
for (var h = 0; h < l.length; h++) {
|
||||||
|
var j = this._removeMarker(l[h])
|
||||||
|
k = k || j
|
||||||
|
}
|
||||||
|
if (k) {
|
||||||
|
this._clearLastClusters()
|
||||||
|
this._createClusters()
|
||||||
|
}
|
||||||
|
return k
|
||||||
|
}
|
||||||
|
e.prototype.clearMarkers = function () {
|
||||||
|
this._clearLastClusters()
|
||||||
|
this._removeMarkersFromMap()
|
||||||
|
this._markers = []
|
||||||
|
}
|
||||||
|
e.prototype._redraw = function () {
|
||||||
|
this._clearLastClusters()
|
||||||
|
this._createClusters()
|
||||||
|
}
|
||||||
|
e.prototype.getGridSize = function () {
|
||||||
|
return this._gridSize
|
||||||
|
}
|
||||||
|
e.prototype.setGridSize = function (h) {
|
||||||
|
this._gridSize = h
|
||||||
|
this._redraw()
|
||||||
|
}
|
||||||
|
e.prototype.getMaxZoom = function () {
|
||||||
|
return this._maxZoom
|
||||||
|
}
|
||||||
|
e.prototype.setMaxZoom = function (h) {
|
||||||
|
this._maxZoom = h
|
||||||
|
this._redraw()
|
||||||
|
}
|
||||||
|
e.prototype.getStyles = function () {
|
||||||
|
return this._styles
|
||||||
|
}
|
||||||
|
e.prototype.setStyles = function (h) {
|
||||||
|
this._styles = h
|
||||||
|
this._redraw()
|
||||||
|
}
|
||||||
|
e.prototype.getMinClusterSize = function () {
|
||||||
|
return this._minClusterSize
|
||||||
|
}
|
||||||
|
e.prototype.setMinClusterSize = function (h) {
|
||||||
|
this._minClusterSize = h
|
||||||
|
this._redraw()
|
||||||
|
}
|
||||||
|
e.prototype.isAverageCenter = function () {
|
||||||
|
return this._isAverageCenter
|
||||||
|
}
|
||||||
|
e.prototype.getMap = function () {
|
||||||
|
return this._map
|
||||||
|
}
|
||||||
|
e.prototype.getMarkers = function () {
|
||||||
|
return this._markers
|
||||||
|
}
|
||||||
|
e.prototype.getClustersCount = function () {
|
||||||
|
var k = 0
|
||||||
|
for (var j = 0, h; (h = this._clusters[j]); j++) {
|
||||||
|
h.isReal() && k++
|
||||||
|
}
|
||||||
|
return k
|
||||||
|
}
|
||||||
|
|
||||||
|
function g(h) {
|
||||||
|
this._markerClusterer = h
|
||||||
|
this._map = h.getMap()
|
||||||
|
this._minClusterSize = h.getMinClusterSize()
|
||||||
|
this._isAverageCenter = h.isAverageCenter()
|
||||||
|
this._center = null
|
||||||
|
this._markers = []
|
||||||
|
this._gridBounds = null
|
||||||
|
this._isReal = false
|
||||||
|
this._clusterMarker = new BMapLib.TextIconOverlay(
|
||||||
|
this._center,
|
||||||
|
this._markers.length,
|
||||||
|
{
|
||||||
|
styles: this._markerClusterer.getStyles(),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
g.prototype.addMarker = function (k) {
|
||||||
|
if (this.isMarkerInCluster(k)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!this._center) {
|
||||||
|
this._center = k.getPosition()
|
||||||
|
this.updateGridBounds()
|
||||||
|
} else {
|
||||||
|
if (this._isAverageCenter) {
|
||||||
|
var j = this._markers.length + 1
|
||||||
|
var o = (this._center.lat * (j - 1) + k.getPosition().lat) / j
|
||||||
|
var m = (this._center.lng * (j - 1) + k.getPosition().lng) / j
|
||||||
|
this._center = new BMap.Point(m, o)
|
||||||
|
this.updateGridBounds()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
k.isInCluster = true
|
||||||
|
this._markers.push(k)
|
||||||
|
var h = this._markers.length
|
||||||
|
if (h < this._minClusterSize) {
|
||||||
|
this._map.addOverlay(k)
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
if (h === this._minClusterSize) {
|
||||||
|
for (var n = 0; n < h; n++) {
|
||||||
|
this._markers[n].getMap() && this._map.removeOverlay(this._markers[n])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._map.addOverlay(this._clusterMarker)
|
||||||
|
this._isReal = true
|
||||||
|
this.updateClusterMarker()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
g.prototype.isMarkerInCluster = function (j) {
|
||||||
|
if (this._markers.indexOf) {
|
||||||
|
return this._markers.indexOf(j) != -1
|
||||||
|
} else {
|
||||||
|
for (var k = 0, h; (h = this._markers[k]); k++) {
|
||||||
|
if (h === j) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
g.prototype.isMarkerInClusterBounds = function (h) {
|
||||||
|
return this._gridBounds.containsPoint(h.getPosition())
|
||||||
|
}
|
||||||
|
g.prototype.isReal = function () {
|
||||||
|
return this._isReal
|
||||||
|
}
|
||||||
|
g.prototype.updateGridBounds = function () {
|
||||||
|
var h = new BMap.Bounds(this._center, this._center)
|
||||||
|
this._gridBounds = b(this._map, h, this._markerClusterer.getGridSize())
|
||||||
|
}
|
||||||
|
g.prototype.updateClusterMarker = function () {
|
||||||
|
if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
|
||||||
|
this._clusterMarker && this._map.removeOverlay(this._clusterMarker)
|
||||||
|
for (var l = 0, j; (j = this._markers[l]); l++) {
|
||||||
|
this._map.addOverlay(j)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this._markers.length < this._minClusterSize) {
|
||||||
|
this._clusterMarker.hide()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this._clusterMarker.setPosition(this._center)
|
||||||
|
this._clusterMarker.setText(this._markers.length)
|
||||||
|
var k = this._map
|
||||||
|
var h = this.getBounds()
|
||||||
|
this._clusterMarker.addEventListener('click', function () {
|
||||||
|
k.setViewport(h)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
g.prototype.remove = function () {
|
||||||
|
// eslint-disable-next-line
|
||||||
|
for (var j = 0, h; (h = this._markers[j]); j++) {
|
||||||
|
this._markers[j].getMap() && this._map.removeOverlay(this._markers[j])
|
||||||
|
}
|
||||||
|
this._map.removeOverlay(this._clusterMarker)
|
||||||
|
this._markers.length = 0
|
||||||
|
delete this._markers
|
||||||
|
}
|
||||||
|
g.prototype.getBounds = function () {
|
||||||
|
var k = new BMap.Bounds(this._center, this._center)
|
||||||
|
for (var j = 0, h; (h = this._markers[j]); j++) {
|
||||||
|
k.extend(h.getPosition())
|
||||||
|
}
|
||||||
|
return k
|
||||||
|
}
|
||||||
|
g.prototype.getCenter = function () {
|
||||||
|
return this._center
|
||||||
|
}
|
||||||
|
})()
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,19 @@
|
|||||||
|
let bmapcfg = {
|
||||||
|
'imgext': '.png', //瓦片图的后缀 ------ 根据需要修改,一般是 .png .jpg
|
||||||
|
'tiles_dir': 'roadmap', //普通瓦片图的地址,为空默认在 offlinemap/tiles/ 目录
|
||||||
|
//'tiles_path': `http://${window.location.host}`,
|
||||||
|
'tiles_path': `http://172.18.113.50:8118`,
|
||||||
|
'tiles_hybrid': '', //卫星瓦片图的地址,为空默认在 offlinemap/tiles_hybrid/ 目录
|
||||||
|
'tiles_self': '' //自定义图层的地址,为空默认在 offlinemap/tiles_self/ 目录
|
||||||
|
};
|
||||||
|
|
||||||
|
//////////////////下面的保持不动///////////////////////////////////
|
||||||
|
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主目录
|
||||||
|
(function () {
|
||||||
|
window.BMap_loadScriptTime = (new Date).getTime();
|
||||||
|
//加载地图API主文件
|
||||||
|
document.write('<script type="text/javascript" src="' + bmapcfg.home + 'baiduapi.js"></script>')
|
||||||
|
})();
|
||||||
|
///////////////////////////////////////////////////////////////////
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('clayer', 'x.extend(rb.prototype,{ll:{},Kj:[],fv:"",Gq:"",eH:"",ml:p,Mg:p,Lg:p,Kg:[],dH:0,Nz:t(),Jz:t(),Zu:t(),Td:function(){this.mH()},ra:function(a,b){Hd.prototype.ra.call(this,a,b);this.ll={};this.Kj=[];this.D=a;this.mH()},St:ea(o),remove:function(){Hd.prototype.remove.call(this);this.wU()},mH:function(){var a=this,b=a.D;b&&(this.Nz=function(b){a.PT(b)},this.Jz=function(b){a.qT(b)},this.Zu=function(b){a.pT(b)},b.addEventListener("mousemove",this.Nz),b.addEventListener("onhotspotover",this.Jz),b.addEventListener("onhotspotout", this.Zu),b.addEventListener("onzoomstart",this.Zu))},wU:function(){var a=this.D;a&&(a.removeEventListener("mousemove",this.Nz),a.removeEventListener("onhotspotover",this.Jz),a.removeEventListener("onhotspotout",this.Zu))},PT:function(a){var b=this,c=b.D,d=c.oa();if(c.ga()<this.fc||c.Wb())b.RB();else if(a=d.Nm().Fl(a.point),d=d.k.Ob,a=new R(Math.floor(a.x*Math.pow(2,c.ga()-18)),Math.floor(a.y*Math.pow(2,c.ga()-18))),d=new R(Math.floor(a.x/d),Math.floor(a.y/d)),this.Gq=c=d.x+"_"+d.y+"_"+c.ga(),this.ll[c]){if(this.fv!= c){b.RB();b.lH(this.ll[c]);this.fv=c;for(var d=-1,a=0,e=this.Kj.length;a<e;a++)if(c==this.Kj[a]){d=a;break}0<=d&&(this.Kj.splice(d,d),this.Kj.push(c))}}else if(this.eH!=c){this.eH=c;d=Sd[parseInt(Math.random()*Sd.length)];a=b.oc;c=d+"/data?grids="+c+"&q="+a.qn+"&tags="+a.uz+"&filter="+a.filter+"&sortby="+a.oz+"&ak="+a.hm+"&page_size="+a.fO+"&age="+a.Uw;b.Bf?c+="&geotable_id="+b.Bf:b.jo&&(c+="&databox_id="+b.jo);var f=(1E5*Math.random()).toFixed(0);!B._rd&&(B._rd={});B._rd["_cbk"+f]=function(a){b.iT(a); delete B._rd["_cbk"+f]};sa(c+("&callback=BMap._rd._cbk"+f))}},iT:function(a){var b=this.D,c=a.content;if(!(a.status!=this.dH||!c||1>c.length)){for(var a=[],d=c[0].data,b=b.oa().Nm(),e=0,f=d.length;e<f;e++){var g=d[e][2].replace(rb.KU,"").split(","),g=b.rh(new K(g[0],g[1]));a.push({pt:g,userdata:{name:d[e][0]||"name",size:d[e][4]?d[e][4].split("|"):[10,13],uid:d[e][1]||"",QO:d[e][3]||"sid1"}})}c=c[0].grid.join("_");this.ll[c]=a;this.Kj.push(c);30<this.Kj.length&&(c=this.Kj.shift(),delete this.ll[c], delete c);this.fv!=this.Gq&&(this.RB(),this.ll[this.Gq]&&(this.lH(this.ll[this.Gq]),this.fv=this.Gq))}},lH:function(a){for(var b=this.D,c=0,d=a.length;c<d;c++){var e=a[c].userdata.size,f=e[0]/2,e=e[1]/2,f=new mb(a[c].pt,{offsets:[e,f,e,f],userData:a[c].userdata});b.Qw(f,this.oc.Kk)}},RB:function(){this.D.rm(this.oc.Kk)},qT:function(a){if(a.spots&&!(1>a.spots.length||a.spots[0].tag!=this.oc.Kk)){this.Kg=a.spots;var b=this,a=this.Kg[0].getUserData().size[0],c="",d=b.D,e="",f=b.oc.nZ;0<this.Kg.length&& (c=this.Kg[0].getUserData().name);if(this.Mg)this.Mg.ta(this.Kg[0].ia()),this.Lg.ad(c),this.Lg.Ye(new M(a,0)),this.Mg.show(),c?this.Lg.show():this.Lg.U();else{var g=this.Kg[0].getUserData().size,e=this.Kg[0].getUserData().QO,i=this.Bf||this.jo;this.ml=new nd(I.pa+"blank.gif",new M(g[0],g[1]),{anchor:new M(g[0]/2+1,g[1]/2+1)});this.ZS(i,e,function(){b.Mg&&b.Mg.Vb(b.ml)});this.Mg=new W(this.Kg[0].ia(),{icon:this.ml,enableMassClear:q});d.Ka(this.Mg);this.Lg=new ud(c,{offset:new M(a,0)});this.Lg.bd({backgroundColor:f.backgroundColor, borderColor:f.borderColor});this.Mg.zn(this.Lg);c?this.Lg.show():this.Lg.U();this.Mg.addEventListener("onclick",function(){if(!(b.Kg.length<1)&&b.Kg[0].getUserData().uid){var a=b.oc,c=a.OY;if(b.Bf)c=a.PY;a=c+b.Kg[0].getUserData().uid+"?scope=2&ak="+a.hm;b.Bf&&(a=a+("&geotable_id="+b.Bf));var d=(Math.random()*1E5).toFixed(0);!B._rd&&(B._rd={});B._rd["_cbk"+d]=function(a){b.YS(a);delete B._rd["_cbk"+d]};sa(a+("&callback=BMap._rd._cbk"+d))}})}}},YS:function(a){var b=a.content;this.Bf&&(b=a.contents[0]); if(a&&a.status==this.dH&&b){var a={poiId:b.uid||"",databoxId:b.databox_id||"",title:this.Bf?b.title:b.name,address:this.Bf?b.address:b.addr,phoneNumber:b.tel||"",postcode:b.zip||"",provinceCode:1*b.province_id||-1,province:b.province||"",cityCode:1*b.city_id||-1,city:b.city||"",districtCode:1*b.district_id||-1,district:b.district||"",point:this.Bf?new K(b.location[0],b.location[1]):new K(b.longitude,b.latitude),tags:b.tag&&b.tag.replace(rb.NU,"").split(rb.LU),typeId:1*b.cla||-1,extendedData:b.ext|| {}},c=new x.lang.Iz("onhotspotclick");c.customPoi=a;c.content=b;this.dispatchEvent(c)}},pT:function(){this.Mg&&this.Mg.U();this.Lg&&this.Lg.U()},ZS:function(a,b,c){var d=this,e=Td+"?method=getstyle&databox="+a+"&sid="+b,f=(1E5*Math.random()).toFixed(0);if(!d.ml||!(d.ml.databoxid==a&&d.ml.sid==b))!B._rd&&(B._rd={}),B._rd["_cbk"+f]=function(a){var b="";0==a.status&&(b="data:image/png;base64,"+a.content.sid1);0<b.length&&(d.ml.BO(b),c&&c(a));delete B._rd["_cbk"+f]},sa(e+("&callback=BMap._rd._cbk"+f))}}); ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('common', 'x.cookie=x.cookie||{};x.cookie.II=function(a){return RegExp(\'^[^\\\\x00-\\\\x20\\\\x7f\\\\(\\\\)<>@,;:\\\\\\\\\\\\"\\\\[\\\\]\\\\?=\\\\{\\\\}\\\\/\\\\u0080-\\\\uffff]+$\').test(a)};x.cookie.pY=function(a){return x.cookie.II(a)&&(a=RegExp("(^| )"+a+"=([^;]*)(;|$)").exec(document.cookie))?a[2]||p:p};x.cookie.get=function(a){a=x.cookie.pY(a);return"string"==typeof a?a=decodeURIComponent(a):p}; x.cookie.JO=function(a,b,c){if(x.cookie.II(a)){var c=c||{},d=c.hh;"number"==typeof c.hh&&(d=new Date,d.setTime(d.getTime()+c.hh));document.cookie=a+"="+b+(c.path?"; path="+c.path:"")+(d?"; expires="+d.toGMTString():"")+(c.domain?"; domain="+c.domain:"")+(c.x_?"; secure":"")}};x.cookie.set=function(a,b,c){x.cookie.JO(a,encodeURIComponent(b),c)};x.cookie.remove=function(a,b){b=b||{};b.hh=new Date(0);x.cookie.JO(a,"",b)};x.Qt=function(a){return/\\d{11}/.test(a)};x.bZ=function(a){return/\\d{4}/.test(a)}; x.Fs=function(){function a(a){a=a.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,function(a,b,c,d){return b+b+c+c+d+d});return(a=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(a))?"rgb("+parseInt(a[1],16)+","+parseInt(a[2],16)+","+parseInt(a[3],16)+")":p}var b={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887", cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3", deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6", lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee", mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6", purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}, c={hex:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,rgb:/rgb\\(\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*\\)/,rgba:/rgba\\(\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(\\d|\\d\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\s*,\\s*(0|1|0\\.[1-9])\\s*\\)/};return{wK:function(a){if(c.hex.test(a))return a;if(c.rgb.test(a))return a=a.match(c.rgb),"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+ ("0"+parseInt(a[3],10).toString(16)).slice(-2);if(b[a])return b[a]},e4:a,M2:function(a){return c.hex.test(a)?a:b[a]?b[a]:"#000"},VC:function(d,e){e===k&&(e=1);if(c.rgba.test(d))return d;"undefined"!=typeof b[d.toLowerCase()]&&(d=b[d.toLowerCase()]);c.hex.test(d)&&(d=a(d));c.rgb.test(d)?(d=d.replace(/rgb/g,"rgba"),d=d.replace(/\\)/,","+e+")")):d="rgba(0,0,0,1)";return d}}}(); ');
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('convertor', 'x.extend(id.prototype,{LQ:function(){for(var a=0,b=this.Pa.length;a<b;a++){var c=this.Pa[a];this[c.method].apply(this,c.arguments)}delete this.Pa},translate:function(a,b,c,d){b=b||1;c=c||5;if(10<a.length)d&&d({status:25});else{var e=B.jc+"geoconv/v1/?coords=";x.Fb(a,function(a){e+=a.lng+","+a.lat+";"});e=e.replace(/;$/gi,"");e=e+"&from="+b+"&to="+c+"&ak="+ra;sa(e,function(a){if(0===a.status){var b=[];x.Fb(a.result,function(a){b.push(new B.Point(a.x,a.y))});delete a.result;a.points=b}d&&d(a)})}}}); ');
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('coordtransutils', 'x.extend(ib,{PV:function(a,b,c){var d=T.tb(a),a=b.dc,d=hd.uE(b.Sb||"bj",d),d=new K(d.x,d.y),e=b.ga(),e=b.oa().yc(e),b=b.vb(),b=new R(Math.round((d.lng-a.lng)/e+b.width/2),Math.round((a.lat-d.lat)/e+b.height/2));c&&c(b)},OV:function(a,b,c){var d=b.ga(),d=b.oa().yc(d),e=b.vb(),f=b.dc,b=b.Sb,a=new K(f.lng+d*(a.x-e.width/2),f.lat-d*(a.y-e.height/2)),a=hd.tE(b||"bj",a),a=new K(a.lng,a.lat),a=T.ub(a);c&&c(a)}}); ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('copyrightctrl', 'x.extend(Xc.prototype,{yf:function(){this.D&&this.Ie(this.D)},initialize:function(a){Rc.prototype.initialize.call(this,a);this.Ba();this.Lo();this.ca(a);return this.C},ca:function(a){var b=this;a.addEventListener("load",function(){b.Lo()});a.addEventListener("moveend",function(){b.Lo()});a.addEventListener("zoomend",function(){b.Lo()});a.addEventListener("maptypechange",function(){b.C&&(b.C.style.color=b.D.oa().Qm())})},Ba:function(){Rc.prototype.Ba.call(this);x.K.Ta(this.C,"BMap_cpyCtrl");var a= this.C.style;a.cursor="default";a.whiteSpace="nowrap";a.MozUserSelect="none";a.color=this.D.oa().Qm();a.background="none";a.font="11px/15px "+I.fontFamily;Rc.prototype.Eo.call(this)},Lo:function(){if(this.D&&this.C&&0!=this.bc.length)for(var a=0,b=this.bc.length;a<b;a++){this.D.ga();var c=this.D.Rb({x:0,y:0}),d=this.D.Rb({x:this.D.width,y:this.D.height}),c=new jb(c,d);if(this.bc[a].bounds&&c.Mt(this.bc[a].bounds)==p){if(this.C)for(d=0;d<this.C.children.length;d++)if(this.C.children[d].getAttribute("_cid")== this.bc[a].id&&"none"!=this.C.children[d].style.display){this.C.children[d].style.display="none";return}}else if(this.C){for(var c=q,d=0,e=this.C.children.length;d<e;d++)if(this.C.children[d].getAttribute("_cid")==this.bc[a].id){c=o;this.C.children[d].style.display="inline";this.C.children[d].innerHTML!=this.bc[a].content&&(this.C.children[d].innerHTML=this.bc[a].content);break}c||this.sr(this.bc[a])}}},Pw:function(a){if(a&&Za(a.id)&&!isNaN(a.id)){var b={bounds:p,content:""},c;for(c in a)b[c]=a[c]; if(a=this.Gm(a.id))for(var d in b)a[d]=b[d];else this.bc.push(b);this.Lo()}},Gm:function(a){for(var b=0,c=this.bc.length;b<c;b++)if(this.bc[b].id==a)return this.bc[b]},kE:v("bc"),JF:function(a){for(var b,c=0,d=this.bc.length;c<d;c++)this.bc[c].id==a&&(b=this.bc.splice(c,1),c--,d=this.bc.length);(a=this.Ld(a))&&a.parentNode&&a.parentNode.removeChild(a);this.Lo();return b},sr:function(a){this.C&&(this.C.innerHTML+="<span _cid=\'"+a.id+"\'>"+a.content+"</span>")},Ld:function(a){var b=Rc.prototype.Ld.call(this); if(Kb(a)){if(b)for(var c=0,d=b.children.length;c<d;c++)if(b.children[c].getAttribute("_cid")==a)return b.children[c]}else return b}});U(mg,{addCopyright:mg.Pw,removeCopyright:mg.JF,getCopyright:mg.Gm,getCopyrightCollection:mg.kE}); ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('draw', 'function th(){}var uh=th.prototype;uh.bG=t();uh.To=function(){ca("addLine\\u63a5\\u53e3\\u6ca1\\u6709\\u5b9e\\u73b0")};uh.setAttribute=function(){ca("setAttribute\\u63a5\\u53e3\\u6ca1\\u6709\\u5b9e\\u73b0")};uh.me=function(){ca("setPath\\u63a5\\u53e3\\u6ca1\\u6709\\u5b9e\\u73b0")};uh.Cp=v("Lb");B.Gz=th; ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('drawbycanvas', 'function zh(a){this.D=a;this.gR={strokeweight:"lineWidth",strokecolor:"strokeStyle",fillcolor:"fillStyle",strokeopacity:"globalAlpha",fillopacity:"globalAlpha"};this.Lb="canvas"}zh.prototype=new B.Gz;var Ah=zh.prototype;Ah.To=function(){if(!this.canvas||this.canvas&&!Cb(this.canvas)){var a=this.canvas=H("canvas");this.D.Rf().Vt.appendChild(a);a.style.position="absolute";a=a.getContext("2d");a.lineCap="round";a.lineJoin="round";a.save();this.QU(this.canvas)}return this.canvas}; Ah.me=function(a,b,c){if(a&&0!==b[0].length){var d=a.getContext("2d");this.ta(a);var e=parseInt(a.style.top),f=parseInt(a.style.left);d.beginPath();x.kc.Fb(b,function(a){if(0!==a.length){d.moveTo(a[0].x-f,a[0].y-e);for(var b=1,c=a.length;b<c;b++)d.lineTo(a[b].x-f,a[b].y-e)}});this.ZR(a,c);"dashed"===c.strokeStyle&&this.aS(d,b,f,e,c)}}; Ah.aS=function(a,b,c,d,e){var f=this;a.beginPath();x.kc.Fb(b,function(b){if(0!==b.length){for(var i=[],j=0,l=b.length;j<l;j++)i.push({x:b[j].x-c,y:b[j].y-d});a.strokeStyle=e.strokeColor||"#3a6bdb";f.$R(a,i,{lineWidth:e.mc||5,interval:2*e.mc||10,lineLength:2*e.mc||10,strokeStyle:f.bT(a.strokeStyle,e.td)})}})}; Ah.$R=function(a,b,c){for(var c=c||{},d=c.ny||10,e=c.lineWidth||5,f=c.v4||10,c=c.strokeStyle||"#3a6bdb",g=b.length-1,i=0,j=f+d,l=0,m=0;m<g;m++)var n=b[m].x,s=b[m].y,u=b[m+1].x,w=b[m+1].y,l=l+Math.sqrt((u-n)*(u-n)+(w-s)*(w-s));if(l<f)a.strokeStyle=c,a.lineWidth=e,a.lineJoin="round",a.lineCap="round",a.beginPath(),a.moveTo(b[0].x,b[0].y),a.lineTo(b[g].x,b[g].y),a.stroke();else for(l=0;l<g;l++){var n=b[l].x,s=b[l].y,u=b[l+1].x,w=b[l+1].y,m=Math.sqrt((u-n)*(u-n)+(w-s)*(w-s))+i+f,y=j-Math.abs(i);if(i<= j){var D=parseInt(m/j),C=d*(u-n)/m,F=d*(w-s)/m;xMove=f*(u-n)/m;yMove=f*(w-s)/m;startX=n+y*(u-n)/m;startY=s+y*(w-s)/m;tailX=n+(f-Math.abs(i))*(u-n)/m;tailY=s+(f-Math.abs(i))*(w-s)/m;a.beginPath();a.strokeStyle=c;a.lineJoin="round";a.lineCap="round";a.lineWidth=e;A?a.moveTo(A,z):a.moveTo(n,s);0>=i&&a.lineTo(n,s);a.lineTo(tailX,tailY);a.moveTo(startX,startY);A=0;for(z=2*D;A<z;A++)if(A%2)startX+=C,startY+=F,a.moveTo(startX,startY);else{startX+=xMove;startY+=yMove;if(0>(u-startX)*xMove)break;a.lineTo(startX, startY)}a.stroke()}var i=parseInt(m-j*D)-f,A=u-Math.abs(i)*(u-n)/m,z=w-Math.abs(i)*(w-s)/m;l===g-1&&0<i&&(a.beginPath(),a.strokeStyle=c,n=u-i*(u-n)/m,leftY=w-i*(w-s)/m,i<=f?(a.moveTo(n,leftY),a.lineTo(u,w)):(a.moveTo(n,leftY),a.moveTo(n+xMove,leftY+yMove)),a.stroke())}}; Ah.bT=function(a,b){if(4===a.length)var c=parseInt(a.substr(1,1)+a.substr(1,1),16),d=parseInt(a.substr(2,1)+a.substr(2,1),16),e=parseInt(a.substr(3,1)+a.substr(3,1),16);else c=parseInt(a.substr(1,2),16),d=parseInt(a.substr(3,2),16),e=parseInt(a.substr(5,2),16);return c="rgba("+c+","+d+","+e+","+b+")"};Ah.setAttribute=function(a,b,c){if(a){var d=a.getContext("2d"),e=this.ur(b);try{d[e]=c}catch(f){}a.setAttribute("_"+b,c||"");d.save()}};Ah.ur=function(a){return this.gR[a]||a}; Ah.QU=function(a){var b=this.D,c=b.B.Cx,d=b.width+2*c,e=b.height+2*c,f=-b.offsetX-c,b=-b.offsetY-c,c=a.getContext("2d"),g={strokeStyle:c.strokeStyle,fillStyle:c.fillStyle,globalAlpha:c.globalAlpha,lineWidth:c.lineWidth,lineCap:"round",lineJoin:"round"};a.setAttribute("width",d);a.setAttribute("height",e);for(var i in g)c[i]=g[i];c.save();a=a.style;a.top=b+"px";a.left=f+"px"};Ah.qR=function(a){a.clearRect(0,0,9999,9999)}; Ah.ZR=function(a,b){var c=a.getContext("2d");c.globalAlpha=a.getAttribute("_fillopacity");0!==c.globalAlpha&&a.getAttribute("_fillcolor")&&c.fill();c.globalAlpha=a.getAttribute("_strokeopacity");0!==c.globalAlpha&&(a.getAttribute("_strokecolor")&&"dashed"!==b.strokeStyle)&&c.stroke()};Ah.ta=function(a){var b=this.D,c=b.B.Cx,d=-b.offsetX-c,a=a.style;a.top=-b.offsetY-c+"px";a.left=d+"px"};B.UP=zh; ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('drawbysvg', 'function vh(a){this.D=a;this.fH="http://www.w3.org/2000/svg";this.kV={strokeweight:"stroke-width",strokecolor:"stroke",fillcolor:"fill",strokeopacity:"stroke-opacity",fillopacity:"fill-opacity",strokestyle:"stroke-dasharray"};this.hf=this.uA();this.Lb="svg"}vh.prototype=new B.Gz;var wh=vh.prototype; wh.uA=function(){var a=this.hf=H("svg",{},this.fH);a.setAttribute("version","1.1");a.setAttribute("type","system");a.style.position="absolute";this.bG();this.D.Rf().Vt.appendChild(a);x.M(a,J()?"touchstart":"mousedown",Gb);return a}; wh.bG=function(){if(this.hf){var a=this.hf,b=this.D,c=b.B.Cx,d=b.width+2*c,e=b.height+2*c,f=-b.offsetX-c,b=-b.offsetY-c;this.setAttribute(a,"x",d+"px");this.setAttribute(a,"y",e+"px");this.setAttribute(a,"viewBox",f+" "+b+" "+d+" "+e);a=a.style;a.top=b+"px";a.left=f+"px";a.width=d+"px";a.height=e+"px"}};wh.T3=v("hf");wh.setAttribute=function(a,b,c,d){if(a)return"strokestyle"==b&&(c="solid"==c?0:2*d),a.setAttributeNS(p,this.ur(b),c||"none"),a};wh.ur=function(a){return this.kV[a]||a}; wh.To=function(){var a=H("path",{},this.fH);this.setAttribute(a,"stroke-linejoin","round");this.setAttribute(a,"stroke-linecap","round");this.setAttribute(a,"fill-rule","evenodd");this.hf.appendChild(a);return a};wh.me=function(a,b){var c=this.OA(b)||"M -9999,-9999";this.setAttribute(a,"d",c)};wh.OA=function(a){if(0==a.length)return"";var b=[];x.kc.Fb(a,function(a){if(!(2>a.length)){b.push("M "+a[0].x+" "+a[0].y+" L");for(var d=1,e=a.length;d<e;d++)b.push(a[d].x),b.push(a[d].y)}});return b.join(" ")}; B.tQ=vh; ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('drawbyvml', 'function xh(a){this.D=a;this.tV={strokeweight:"weight",strokecolor:"color",fillcolor:"color",strokeopacity:"opacity",fillopacity:"opacity",strokestyle:"dashstyle"};this.Lb="vml"}xh.SK={orange:"#ffa500"};xh.prototype=new B.Gz;var yh=xh.prototype; yh.setAttribute=function(a,b,c){a&&(0==b.indexOf("stroke")?a=a.getElementsByTagName("stroke")[0]:0==b.indexOf("fill")&&(a=a.getElementsByTagName("fill")[0]),0<b.indexOf("color")&&(c?(a.on=o,xh.SK[c]&&(c=xh.SK[c])):a.on=q),"strokestyle"==b&&(c="solid"==c?"solid":"4 2 1 2"),"strokeweight"==b&&(c+="px"),a[this.ur(b)]=c||"")};yh.ur=function(a){return this.tV[a]||a};yh.To=function(){return Db(this.D.Rf().Vt,\'<v:shape style="behavior:url(#default#VML);z-index:1;width:1px;height:1px;position:absolute;left:0;top:0;"coordsize="1,1" coordorigin="0,0" filled="t" fillcolor="white"><v:stroke style="behavior:url(#default#VML);" endcap="round" oned="true" /><v:fill style="behavior:url(#default#VML)" /></v:shape>\')}; yh.me=function(a,b){this.setAttribute(a,"path",this.OA(b));6==x.da.ma&&(a.style.display="none",a.style.display="")};yh.OA=function(a){if(0==a.length)return"";var b=[];x.kc.Fb(a,function(a){if(!(2>a.length)){b.push("m "+a[0].x+" "+a[0].y+" l");for(var d=1,e=a.length;d<e;d++)b.push(a[d].x),b.push(a[d].y);b.push("e")}});return b.join(" ")||" "};B.wQ=xh; ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('geoctrl', 'x.extend(Vc.prototype,{initialize:function(a){var b=this;Rc.prototype.initialize.call(b,a);b.Ba();b.Or={"default":B.la+"images/geolocation-control/mobile/default-40x40.png",loading:B.la+"images/geolocation-control/mobile/loading-40x40.gif",success:B.la+"images/geolocation-control/mobile/success-40x40.png",fail:B.la+"images/geolocation-control/mobile/fail-40x40.png"};b.sj=b.C.children[0];b.bE=b.sj.children[0];b.op=b.bE.children[0];b.$D=b.sj.children[1];b.PL=b.$D.children[0].children[0];var c;b.D.addEventListener("moveend", function(){if(c){var a=b.D.pc();a.lng===c.lng&&a.lat===c.lat?b.is(b.Or.success):(b.is(b.Or["default"]),b.oR())}});x.M(b.op,"click",function(){b.is(b.Or.loading);(new Geolocation({timeout:1E4})).getCurrentPosition(function(d){b.is(b.Or.success);if(d.address&&b.k.a0){var e="";d.address.city?e+=d.address.city:d.address.province&&(e+=d.address.province);d.address.district&&(e+=d.address.district);d.address.street&&(e+=d.address.street);d.address.street_number&&(e+=d.address.street_number);b.OU(e)}var f= new K(d.longitude,d.latitude),e=new W(f,{icon:b.k.nN?b.k.nN:new nd(B.la+"images/geolocation-control/point/position-icon-14x14.png",new M(14,14))});c=f;b.cE=f;a.Ka(e);a.Gd(f,15);d.address&&(b.Bs={province:d.address.province||"",city:d.address.city||"",district:d.address.district||"",street:d.address.street||"",streetNumber:d.address.street_number||""},Ta(7001,{longitude:d.longitude,latitude:d.latitude,accuracy:d.accuracy}));d=new N("locationSuccess");d.point=b.cE;d.marker=e;d.addressComponent=b.Bs; b.dispatchEvent(d)},function(a){b.is(b.Or.fail);var c=new N("locationError");c.code=a.errorCode;c.message=a.nf;b.dispatchEvent(c)})});return b.C},location:function(){var a=this;a.P0.push({});(new Geolocation({timeout:1E4})).getCurrentPosition(function(b){a.cE=new K(b.longitude,b.latitude);b.address&&(a.Bs={province:b.address.province||"",city:b.address.city||"",district:b.address.district||"",street:b.address.street||"",streetNumber:b.address.street_number||""});b=new N("locationSuccess");b.point= a.cE;b.addressComponent=a.Bs;a.dispatchEvent(b)},function(b){var c=new N("locationError");c.code=b.errorCode;c.message=b.nf;a.dispatchEvent(c)})},KX:function(){return this.Bs?this.Bs:p},NQ:function(){this.D?this.Ie(this.D):this.map&&this.Ie(this.map)},Ba:function(){Rc.prototype.Ba.call(this);this.C.style.cssText="height: 32px;";this.C.innerHTML=this.tr()},tr:function(){return[\'<div class="BMap_geolocationContainer" style="height: 32px; margin: 0px; box-sizing: border-box; border: 1px solid #d9d7d5; border-radius: 3px; -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2); overflow: hidden;">\', \'<div class="BMap_geolocationIconBackground" style="float: left; width: 32px; height: 32px; background-image: url(\\\'\'+B.la+"images/geolocation-control/mobile/gradient-bg-1x64.png\'); background-size: 1px 32px; background-repeat: repeat-x;\\">",\'<div class="BMap_geolocationIcon" style="width: 32px; height: 32px; cursor: pointer; background-image: url(\\\'\'+B.la+"images/geolocation-control/mobile/default-40x40.png\'); background-size: 20px 20px; background-repeat: no-repeat; background-position: center center;\\"></div>", "</div>",\'<div class="BMap_geolocationAddress" style="display: none; float: left; min-width: 50px; padding-left: 10px; padding-right: 10px; border-left: 1px solid #d9d7d5; background-image: url(\'+B.la+\'images/geolocation-control/mobile/gradient-bg-1x64.png); background-size: 1px 32px; background-repeat: repeat-x;">\',\'<div style="height: 32px; display: table-cell; vertical-align: middle;"><div class="BMap_geolocationAddressText" style="font-size: 12px; color: #666666; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; display: block; min-width: 50px; max-width: 200px;"></div></div></div></div>\'].join("")}, is:function(a){this.op.style.backgroundImage="url(\'"+a+"\')"},OU:function(a){this.$D.style.display="block";this.PL.textContent=a},oR:function(){this.PL.textContent="";this.$D.style.display="none"}});Vc.prototype.location=Vc.prototype.location;Vc.prototype.getAddressComponent=Vc.prototype.KX; ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('groundoverlay', 'x.extend(vd.prototype,{Ab:function(){if(this.map){this.V||this.Pj();var a=this.map.ga();if(a<this.z.Ts||a>this.z.Ss)this.U();else{var b=this.z.$a.xe(),c=this.z.$a.pf(),a=this.map.We(b).x,d=this.map.We(c).y,c=this.map.We(c).x,b=this.map.We(b).y;this.V.style.left=a+"px";this.V.style.top=d+"px";this.V.style.width=c-a+"px";this.V.style.height=b-d+"px";this.show()}}},draw:function(){this.Ab()},Pj:function(){if(!this.V){this.V=document.createElement("div");var a=this.V.style;a.cssText="position: absolute; -moz-user-select: none; overflow: hidden;"; a.zIndex=jd.Sm(this.z.$a.xe().lat);if(this.z.opacity||0===this.z.opacity)a.opacity=this.z.opacity,a.filter="alpha(opacity="+100*parseInt(this.z.opacity,10)+")";this.Rg=document.createElement("img");this.Rg.style.width="100%";this.z.i0&&(this.Rg.style.height="100%");this.V.appendChild(this.Rg);var b=this;this.Rg.onload=function(){b.c2=b.Rg.naturalWidth||b.Rg.width;b.b2=b.Rg.naturalHeight||b.Rg.height};this.z.Hp&&(this.Rg.src=this.z.Hp);this.map.Rf().eF.appendChild(this.V);b=this;x.M(this.V,"click", function(a){b.dispatchEvent(new N("click"),a)});x.M(this.V,"dblclick",function(a){b.dispatchEvent(new N("dblclick"),a)})}},E_:function(a){this.z.$a=a;this.map&&this.Ab();this.V.style.zIndex=jd.Sm(this.z.$a.xe().lat)},Kd:function(){return this.z.$a},aG:function(a){this.z.opacity=a;this.V.style.opacity=a;this.V.style.filter="alpha(opacity="+100*parseInt(a,10)+")"},jY:function(){return this.z.opacity},M_:function(a){this.z.Hp=a;this.Rg&&(this.Rg.src=a)},YX:function(){return this.z.Hp},r5:function(a){this.z.Ts= a},B3:function(){return this.z.Ts},q5:function(a){this.z.Ss=a},A3:function(){return this.z.Ss}});vd.prototype.setBounds=vd.prototype.E_;vd.prototype.getBounds=vd.prototype.Kd;vd.prototype.setOpacity=vd.prototype.aG;vd.prototype.getOpacity=vd.prototype.jY;vd.prototype.setImageURL=vd.prototype.M_;vd.prototype.getImageURL=vd.prototype.YX;vd.prototype.setDispalyOnMinLevel=vd.prototype.p5;vd.prototype.setDispalyOnMaxLevel=vd.prototype.o5; ');
|
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('hotspot', 'B.Xe(function(a){function b(a){var b=this.R;b.Re=[];if(this.Sh)for(var c in this.Sh)if(!(0==c.indexOf("vector_")&&!this.Wb()||0==c.indexOf("tile_")&&this.Wb())){var g=this.Sh[c],i;for(i in g){var j=g[i];if(!(j.Uh>this.ga()||j.Gf<this.ga())){var l=this.Cc(j.ia());l.x<this.width&&l.y<this.height&&a.offsetX<l.x+j.Yv[1]&&(a.offsetX>l.x-j.Yv[3]&&a.offsetY>l.y-j.Yv[0]&&a.offsetY<l.y+j.Yv[2])&&b.Re.push(j)}}}}function c(){a.R.pL&&0<a.R.Re.length?(a.platform.style.cursor="pointer",a.R.pL=q):(a.R.Re=[],a.platform.style.cursor= a.B.Xb)}a.R.Cu=new ud("",{Aa:new M(15,-3),tq:{border:"1px solid #aaa",background:"#fffec2",whiteSpace:"nowrap",font:"12px "+I.fontFamily,mozBoxShadow:"1px 2px 6px #666",webkitBoxShadow:"1px 2px 6px #666",boxShadow:"1px 2px 6px #666",padding:"2px 4px"}});a.addEventListener("mousemove",function(c){if(!(c.cb&&!(c.cb instanceof ld)||c.Bb)){var e=this.R,f=e.Re.slice(0);b.call(this,c);for(var g=e.Re.slice(0),i=0;i<f.length;i++)for(var j=0;j<g.length;j++)f[i]===g[j]&&(f.splice(i,1),i--,g.splice(j,1),j--); if(0<f.length){var l=new N("onhotspotout");l.spots=f.slice(0);this.dispatchEvent(l)}if(0==e.Re.length&&!e.ty)this.platform.style.cursor!=this.B.Xb&&(this.platform.style.cursor=this.B.Xb),e.rq&&(clearTimeout(e.rq),e.rq=p),e.kG=setTimeout(function(){e.Cu.U()},400);else if(0<g.length&&(this.platform.style.cursor="pointer",l=new N("onhotspotover"),l.spots=g.slice(0),this.dispatchEvent(l),e.rq&&(clearTimeout(e.rq),e.rq=p),e.kG&&(clearTimeout(e.kG),e.kG=p),l.spots[0].AE()))e.rq=setTimeout(function(){e.Cu.ad(l.spots[0].AE()); e.Cu.ta(c.point);e.Cu.show();a.Ka(e.Cu)},400)}});a.addEventListener("clickex",function(a){var c=this.R;a.overlay||(0==c.Re.length&&b.call(this,a),0<c.Re.length&&(a=new N("onhotspotclick"),a.spots=c.Re.slice(0),a.spots.sort(function(a,b){return a.ia().lat-b.ia().lat}),this.dispatchEvent(a),c.Re.length=0))});a.addEventListener("load",c);a.addEventListener("moveend",c);a.addEventListener("zoomend",c);a.addEventListener("dragend",function(){this.R.pL=o})}); ');
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('markeranimation', 'Fd[1]={options:{duration:400},Um:[{$b:0,translate:[0,-500],gc:"ease-in"},{$b:0.5,translate:[0,0],gc:"ease-out"},{$b:0.75,translate:[0,-20],gc:"ease-in"},{$b:1,translate:[0,0],gc:"ease-out"}],vu:[{$b:0,translate:[375,-375],gc:"ease-in"},{$b:0.5,translate:[0,0],gc:"ease-out"},{$b:0.75,translate:[15,-15],gc:"ease-in"},{$b:1,translate:[0,0],gc:"ease-out"}]}; Fd[2]={options:{duration:700,loop:yb},Um:[{$b:0,translate:[0,0],gc:"ease-out"},{$b:0.5,translate:[0,-20],gc:"ease-in"},{$b:1,translate:[0,0],gc:"ease-out"}],vu:[{$b:0,translate:[0,0],gc:"ease-out"},{$b:0.5,translate:[15,-15],gc:"ease-in"},{$b:1,translate:[0,0],gc:"ease-out"}]};Fd[3]={options:{duration:200,wP:o},Um:[{$b:0,translate:[0,0],gc:"ease-in"},{$b:1,translate:[0,-20],gc:"ease-out"}],vu:[{$b:0,translate:[0,0],gc:"ease-in"},{$b:1,translate:[15,-15],gc:"ease-out"}]}; Fd[4]={options:{duration:500,wP:o},Um:[{$b:0,translate:[0,-20],gc:"ease-in"},{$b:0.5,translate:[0,0],gc:"ease-out"},{$b:0.75,translate:[0,-10],gc:"ease-in"},{$b:1,translate:[0,-0.0],gc:"ease-out"}],vu:[{$b:0,translate:[15,-15],gc:"ease-in"},{$b:0.5,translate:[0,0],gc:"ease-out"},{$b:0.75,translate:[8,-8],gc:"ease-in"},{$b:1,translate:[0,0],gc:"ease-out"}]}; ');
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
/**/_jsload2 && _jsload2('vmlcontext', 'var ah=10,bh=ah/2; function ch(a){this.vi=[[1,0,0],[0,1,0],[0,0,1]];this.oN=[];this.lK=[];this.xk=[];this.lineWidth=1;this.miterLimit=1*ah;this.canvas=a;var b=H("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.position="absolute";a.appendChild(b);this.yL=b;this.fN=this.Xw=this.Ww=1;document.styleSheets.canvas_style||(a=document.createStyleSheet(),a.owningElement.id="canvas_style",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\\\:shape,g_vml_\\\\:fill,g_vml_\\\\:stroke{behavior:url(#default#VML)}")} function dh(a,b){for(var c=[[1,0,0],[0,1,0],[0,0,1]],d=0;3>d;d++)for(var e=0;3>e;e++){for(var f=0,g=0;3>g;g++)f+=a[d][g]*b[g][e];c[d][e]=f}return c}var eh=ch.prototype;eh.clearRect=function(){this.yL.innerHTML=""};eh.beginPath=function(){this.xk=[]};eh.moveTo=function(a,b){var c=this.pi(a,b);this.xk.push({type:"moveTo",x:c.x,y:c.y});this.Ls=c.x;this.Ms=c.y};eh.lineTo=function(a,b){var c=this.pi(a,b);this.xk.push({type:"lineTo",x:c.x,y:c.y});this.Ls=c.x;this.Ms=c.y}; eh.bezierCurveTo=function(a,b,c,d,e,f){fh(this,this.pi(a,b),this.pi(c,d),this.pi(e,f))};function fh(a,b,c,d){a.xk.push({type:"bezierCurveTo",DW:b.x,EW:b.y,FW:c.x,GW:c.y,x:d.x,y:d.y});a.Ls=d.x;a.Ms=d.y}eh.quadraticCurveTo=function(a,b,c,d){a=this.pi(a,b);c=this.pi(c,d);d={x:this.Ls+2/3*(a.x-this.Ls),y:this.Ms+2/3*(a.y-this.Ms)};fh(this,d,{x:d.x+(c.x-this.Ls)/3,y:d.y+(c.y-this.Ms)/3},c)}; eh.arc=function(a,b,c,d,e,f){var c=c*ah,g=a+Math.cos(d)*c-bh,i=b+Math.sin(d)*c-bh,d=a+Math.cos(e)*c-bh,e=b+Math.sin(e)*c-bh;g==d&&!f&&(g+=0.125);a=this.pi(a,b);g=this.pi(g,i);d=this.pi(d,e);this.xk.push({type:f?"at":"wa",x:a.x,y:a.y,xa:c,h1:g.x,j1:g.y,g1:d.x,i1:d.y})};eh.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()}; eh.stroke=function(a){var b=[],c=a?this.fillStyle:this.strokeStyle,d=c.color,c=c.alpha;b.push("<g_vml_:shape",\' filled="\',!!a,\'"\',\' style="position:absolute;width:\',10,"px;height:",10,\'px;"\',\' coordorigin="0 0" coordsize="\',10*ah," ",10*ah,\'"\',\' stroked="\',!a,\'"\',\' path="\');for(var e=p,f=p,g=p,i=p,j=0;j<this.xk.length;j++){var l=this.xk[j];switch(l.type){case "moveTo":b.push(" m ",Math.round(l.x),",",Math.round(l.y));break;case "lineTo":b.push(" l ",Math.round(l.x),",",Math.round(l.y));break;case "close":b.push(" x "); l=p;break;case "bezierCurveTo":b.push(" c ",Math.round(l.DW),",",Math.round(l.EW),",",Math.round(l.FW),",",Math.round(l.GW),",",Math.round(l.x),",",Math.round(l.y));break;case "at":case "wa":b.push(" ",l.type," ",Math.round(l.x-this.Ww*l.xa),",",Math.round(l.y-this.Xw*l.xa)," ",Math.round(l.x+this.Ww*l.xa),",",Math.round(l.y+this.Xw*l.xa)," ",Math.round(l.h1),",",Math.round(l.j1)," ",Math.round(l.g1),",",Math.round(l.i1))}if(l){if(e==p||l.x<e)e=l.x;if(g==p||l.x>g)g=l.x;if(f==p||l.y<f)f=l.y;if(i== p||l.y>i)i=l.y}}b.push(\' ">\');a?b.push(\'<g_vml_:fill color="\',d,\'" opacity="\',c,\'" />\'):(a=this.fN*this.lineWidth,1>a&&(c*=a),b.push("<g_vml_:stroke",\' opacity="\',c,\'"\',\' joinstyle="\',this.lineJoin,\'"\',\' miterlimit="\',this.miterLimit,\'"\',\' endcap="\',"square",\'"\',\' weight="\',a,\'px"\',\' color="\',d,\'" />\'));b.push("</g_vml_:shape>");this.yL.insertAdjacentHTML("beforeEnd",b.join(""))};eh.fill=function(){this.stroke(o)};eh.closePath=function(){this.xk.push({type:"close"})}; eh.pi=function(a,b){var c=this.vi;return{x:ah*(a*c[0][0]+b*c[1][0]+c[2][0])-bh,y:ah*(a*c[0][1]+b*c[1][1]+c[2][1])-bh}};eh.save=function(){var a={};copyState(this,a);this.lK.push(a);this.oN.push(this.vi);this.vi=dh(createMatrixIdentity(),this.vi)};eh.restore=function(){copyState(this.lK.pop(),this);this.vi=this.oN.pop()}; function gh(a,b,c){var d;a:{for(d=0;3>d;d++)for(var e=0;2>e;e++)if(!isFinite(b[d][e])||isNaN(b[d][e])){d=q;break a}d=o}d&&(a.vi=b,c&&(a.fN=Math.sqrt(Math.abs(b[0][0]*b[1][1]-b[0][1]*b[1][0]))))}eh.translate=function(a,b){gh(this,dh([[1,0,0],[0,1,0],[a,b,1]],this.vi),q)};eh.rotate=function(a){var b=Math.cos(a),a=Math.sin(a);gh(this,dh([[b,a,0],[-a,b,0],[0,0,1]],this.vi),q)};eh.scale=function(a,b){this.Ww*=a;this.Xw*=b;gh(this,dh([[a,0,0],[0,b,0],[0,0,1]],this.vi),o)}; eh.transform=function(a,b,c,d,e,f){gh(this,dh([[a,b,0],[c,d,0],[e,f,1]],this.vi),o)};eh.setTransform=function(a,b,c,d,e,f){gh(this,[[a,b,0],[c,d,0],[e,f,1]],o)};B.vQ=ch; ');
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"type": "FeatureCollection",
|
||||||
|
"name": "AreaCity-Geo",
|
||||||
|
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
|
||||||
|
"features": [
|
||||||
|
{ "type": "Feature", "properties": { "unique_id": "330211001", "ext_path": "浙江省 宁波市 镇海区 招宝山街道", "cid": "0", "pid": "330211", "name": "招宝山街道", "last_time": "2022-11" }, "geometry": { "type": "Point", "coordinates": [ 121.716889, 29.964717 ] } },
|
||||||
|
{ "type": "Feature", "properties": { "unique_id": "330211002", "ext_path": "浙江省 宁波市 镇海区 蛟川街道", "cid": "0", "pid": "330211", "name": "蛟川街道", "last_time": "2022-11" }, "geometry": { "type": "Point", "coordinates": [ 121.672319, 29.961326 ] } },
|
||||||
|
{ "type": "Feature", "properties": { "unique_id": "330211003", "ext_path": "浙江省 宁波市 镇海区 骆驼街道", "cid": "0", "pid": "330211", "name": "骆驼街道", "last_time": "2022-11" }, "geometry": { "type": "Point", "coordinates": [ 121.582491, 29.97749 ] } },
|
||||||
|
{ "type": "Feature", "properties": { "unique_id": "330211004", "ext_path": "浙江省 宁波市 镇海区 庄市街道", "cid": "0", "pid": "330211", "name": "庄市街道", "last_time": "2022-11" }, "geometry": { "type": "Point", "coordinates": [ 121.632643, 29.932736 ] } },
|
||||||
|
{ "type": "Feature", "properties": { "unique_id": "330211005", "ext_path": "浙江省 宁波市 镇海区 贵驷街道", "cid": "0", "pid": "330211", "name": "贵驷街道", "last_time": "2022-11" }, "geometry": { "type": "Point", "coordinates": [ 121.618127, 29.974399 ] } },
|
||||||
|
{ "type": "Feature", "properties": { "unique_id": "330211100", "ext_path": "浙江省 宁波市 镇海区 澥浦镇", "cid": "0", "pid": "330211", "name": "澥浦镇", "last_time": "2022-11" }, "geometry": { "type": "Point", "coordinates": [ 121.630811, 30.024586 ] } },
|
||||||
|
{ "type": "Feature", "properties": { "unique_id": "330211101", "ext_path": "浙江省 宁波市 镇海区 九龙湖镇", "cid": "0", "pid": "330211", "name": "九龙湖镇", "last_time": "2022-11" }, "geometry": { "type": "Point", "coordinates": [ 121.525171, 30.019719 ] } }
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
//基本信息
|
||||||
|
export function topMap(params) {
|
||||||
|
return request({
|
||||||
|
url: '/safety/index/company/top/map',
|
||||||
|
method: 'post',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,202 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="bmap" id="container" ref="container"></div>
|
||||||
|
<el-button class="fanhui" @click="goBack" v-if="isGoBack">返回</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MapLine from "../../../public/zhenhaiLine.json"
|
||||||
|
//import MapPoint from "../../../public/zhenhaiPoint.json"
|
||||||
|
import styleJson from "../../../public/custom_map_config.json"
|
||||||
|
import { topMap } from '@/api/offLineMap'
|
||||||
|
export default {
|
||||||
|
name: 'zhenhaimap',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dongtaiPoint: [121.604192, 29.971189],
|
||||||
|
isGoBack: false,
|
||||||
|
villageList: [],
|
||||||
|
villageSumList: [],
|
||||||
|
flag: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
topMap({ scoreType: 'season' })
|
||||||
|
this.initMap()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goBack() {
|
||||||
|
this.initMap()
|
||||||
|
this.isGoBack = false
|
||||||
|
this.$emit('goBack')
|
||||||
|
},
|
||||||
|
initMap() {
|
||||||
|
var BMap = window.BMap
|
||||||
|
console.log(BMap, 'BMap');
|
||||||
|
var map = new BMap.Map('container', {
|
||||||
|
style: {
|
||||||
|
styleJson
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let that = this
|
||||||
|
map.centerAndZoom(new BMap.Point(this.dongtaiPoint[0], this.dongtaiPoint[1]), 12);
|
||||||
|
map.setMinZoom(11)
|
||||||
|
map.setMaxZoom(19)
|
||||||
|
map.enableScrollWheelZoom(true);
|
||||||
|
// hjrequest({
|
||||||
|
// url: '/yc/dt/statistical/village',
|
||||||
|
// method: 'get',
|
||||||
|
// params: { areaCode: that.areaCode }
|
||||||
|
// }).then((res) => {
|
||||||
|
// that.villageSumList = res.data
|
||||||
|
// })
|
||||||
|
console.log(MapLine, 'MapLine');
|
||||||
|
for (var i = 0, n = MapLine.features.length; i < n; i++) {
|
||||||
|
showBoundaryEx(MapLine.features[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function showBoundaryEx(city) {
|
||||||
|
var paths = []
|
||||||
|
var list = city.geometry.coordinates
|
||||||
|
// console.log(list.length, 'list[0].length')
|
||||||
|
//console.log(list[1], 'list[1].length')
|
||||||
|
var polygon = {}
|
||||||
|
if (list.length > 1) {
|
||||||
|
for (let a = 0; a < list.length; a++) {
|
||||||
|
paths = []
|
||||||
|
for (let i = 0; i < list[a][0].length; i++) {
|
||||||
|
let lat = list[a][0][i][1],
|
||||||
|
lng = list[a][0][i][0];
|
||||||
|
paths.push(new BMap.Point(lng, lat));
|
||||||
|
}
|
||||||
|
polygon = new BMap.Polygon(paths, {
|
||||||
|
fillColor: '#3b4c44',
|
||||||
|
strokeColor: "#0f1423",
|
||||||
|
fillOpacity: 0.6,
|
||||||
|
strokeWeight: 1
|
||||||
|
}); //创建多边形
|
||||||
|
map.addOverlay(polygon); //增加多边形
|
||||||
|
}
|
||||||
|
// // console.log(list, 'length');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log(list[0], ' list[0]');
|
||||||
|
for (let i = 0; i < list[0].length; i++) {
|
||||||
|
let lat = list[0][i][1],
|
||||||
|
lng = list[0][i][0];
|
||||||
|
paths.push(new BMap.Point(lng, lat));
|
||||||
|
}
|
||||||
|
// console.log(list, 'length');
|
||||||
|
polygon = new BMap.Polygon(paths, {
|
||||||
|
fillColor: '#3b4c44',
|
||||||
|
strokeColor: "#0f1423",
|
||||||
|
fillOpacity: 0.6,
|
||||||
|
strokeWeight: 1
|
||||||
|
}); //创建多边形
|
||||||
|
map.addOverlay(polygon); //增加多边形
|
||||||
|
}
|
||||||
|
polygon.infowindow = new BMap.InfoWindow();
|
||||||
|
polygon.infowindow.name = city.properties.name;
|
||||||
|
polygon.addEventListener("mouseover", function () {
|
||||||
|
polygon.setFillColor("#ffa500");
|
||||||
|
});
|
||||||
|
polygon.addEventListener("mouseout", function () {
|
||||||
|
map.removeOverlay(label);
|
||||||
|
polygon.setFillColor('#3b4c44');
|
||||||
|
});
|
||||||
|
//开始用"mouseover","mouseout"发现,鼠标移动过快,会多个省份也高亮了.所以改成 click了
|
||||||
|
polygon.addEventListener("click", function () {
|
||||||
|
console.log(city.properties.name, 'city.properties.name');
|
||||||
|
if (city.properties.name == '骆驼街道') {
|
||||||
|
map.centerAndZoom(new BMap.Point(121.58887, 29.986122), 15);
|
||||||
|
that.isGoBack = true
|
||||||
|
} else if (city.properties.name == '招宝山街道') {
|
||||||
|
map.centerAndZoom(new BMap.Point(121.713707, 29.95656), 15);
|
||||||
|
that.isGoBack = true
|
||||||
|
} else if (city.properties.name == '蛟川街道') {
|
||||||
|
map.centerAndZoom(new BMap.Point(121.686105, 29.947339), 15);
|
||||||
|
that.isGoBack = true
|
||||||
|
} else if (city.properties.name == '庄市街道') {
|
||||||
|
map.centerAndZoom(new BMap.Point(121.627037, 29.925579), 15);
|
||||||
|
that.isGoBack = true
|
||||||
|
} else if (city.properties.name == '贵驷街道') {
|
||||||
|
map.centerAndZoom(new BMap.Point(121.624142, 29.985606), 15);
|
||||||
|
that.isGoBack = true
|
||||||
|
} else if (city.properties.name == '澥浦镇') {
|
||||||
|
map.centerAndZoom(new BMap.Point(121.607133, 30.037162), 15);
|
||||||
|
that.isGoBack = true
|
||||||
|
} else if (city.properties.name == '九龙湖镇') {
|
||||||
|
map.centerAndZoom(new BMap.Point(121.558532, 30.039457), 15);
|
||||||
|
that.isGoBack = true
|
||||||
|
}
|
||||||
|
// let streetCode = that.streetCodeList.filter((item) => {
|
||||||
|
// if (item.areaName == city.properties.name) {
|
||||||
|
// return item.areaCode
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// let goStreetData = { areaCode: that.areaCode, streetCode: streetCode[0].areaCode }
|
||||||
|
// that.$emit('goStreet', streetCode[0].areaCode)
|
||||||
|
// hjrequest({
|
||||||
|
// url: '/yc/dt/statistical/villages',
|
||||||
|
// method: 'get',
|
||||||
|
// params: goStreetData
|
||||||
|
// }).then((res) => {
|
||||||
|
// that.villageList = res.data
|
||||||
|
// that.villageList.forEach((item) => {
|
||||||
|
// var point = new BMap.Point(item.longitude, item.latitude);
|
||||||
|
// var marker = new BMap.Marker(point); // 创建标注
|
||||||
|
// map.addOverlay(marker);
|
||||||
|
// var content = item.villageName;
|
||||||
|
// var label = new BMap.Label(content, { // 创建文本标注
|
||||||
|
// position: point, // 设置标注的地理位置
|
||||||
|
// offset: new BMap.Size(-10, -50) // 设置标注的偏移量
|
||||||
|
// })
|
||||||
|
// label.setStyle({ backgroundColor: ' rgba(0, 0, 0, 0)', border: '0', color: 'yellow', fontSize: '20px' })
|
||||||
|
// map.addOverlay(label);
|
||||||
|
// marker.addEventListener("click", function (e) {
|
||||||
|
// // Cookies.set('village_current', item.villageCode)
|
||||||
|
// window.open(window.location.origin + '/#/communityShow', '_blank');
|
||||||
|
// });
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
|
||||||
|
polygon.removeEventListener('mousemove')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
var label = new BMap.Label();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.bmap {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: 1px solid #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.fanhui {
|
||||||
|
display: inline-block;
|
||||||
|
width: 50px;
|
||||||
|
height: 20px;
|
||||||
|
position: absolute;
|
||||||
|
left: 49%;
|
||||||
|
|
||||||
|
bottom: 30px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 50;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue