You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
4.0 KiB
1 line
4.0 KiB
1 year ago
|
/**/_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.ge
|