function initjwpagefactoryamap(t){var e={_keystr:"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/=",decode:function(t){var a,r,o,n,d,i,s="",c=0;for(t=t.replace(/[^a-za-z0-9+/=]/g,"");c>4,r=(15&n)<<4|(d=this._keystr.indexof(t.charat(c++)))>>2,o=(3&d)<<6|(i=this._keystr.indexof(t.charat(c++))),s+=string.fromcharcode(a),64!=d&&(s+=string.fromcharcode(r)),64!=i&&(s+=string.fromcharcode(o));return s=e._utf8_decode(s)},_utf8_decode:function(t){for(var e="",a=0,r=c1=c2=0;a191&&r<224?(c2=t.charcodeat(a+1),e+=string.fromcharcode((31&r)<<6|63&c2),a+=2):(c2=t.charcodeat(a+1),c3=t.charcodeat(a+2),e+=string.fromcharcode((15&r)<<12|(63&c2)<<6|63&c3),a+=3);return e}};jquery(".jwpf-addon-amap-canvas",t).each(function(a){var r=jquery(this).attr("id"),l=jquery(this).attr("data-maplang"),s=jquery(this).attr("data-mapstyle"),i=jquery(this).attr("data-maptype"),u=jquery(this).attr("data-lat"),g=jquery(this).attr("data-lng"),m=jquery(this).attr("data-marker"),n=jquery(this).attr("data-infowindow"),z=number(jquery(this).attr("data-mapzoom")),d="true"===jquery(this).attr("data-mousescroll"),showinfo=jquery(this).attr("data-showinfo"),c=new amap.map(t.getelementbyid(r),{center:new amap.lnglat(number(g),number(u)),mapstyle:'amap://styles/'+s,zoom:z,lang:l,scrollwheel:d,resizeenable:true}),x=jquery(this).attr("data-location"),a=[];switch(i){case'roadnet':a.push(new amap.tilelayer.roadnet());break;case'satellite':a.push(new amap.tilelayer.satellite());break;case'hybrid':a.push(new amap.tilelayer.satellite());a.push(new amap.tilelayer.roadnet());break;case'traffic':a.push(new amap.tilelayer.traffic());a.push(new amap.tilelayer());break;default:a.push(new amap.tilelayer());break}c.setlayers(a);if(void 0!==x){var h=e.decode(n),l=json.stringify([{address:h,latitude:u,longitude:g,icon:m}]),f=e.decode(x),p=json.parse(l),b=json.parse(f),o=p.concat(b),c=o.length;if(c>0){var n=new amap.infowindow({offset:new amap.pixel(5,-30)});for(var s=0;s'+o[s].address+'');n.open(c,w.getposition())}w.on('click',function(e){n.setcontent('
'+e.target.content+'
');n.open(c,e.target.getposition())})}}if(c>1)c.setfitview()}}})}jquery(window).on("load",function(){initjwpagefactoryamap(document)});