某网站经纬度Decode

时间:2022-02-11 19:29:17
 <script type="text/javascript">$pi={"cid":2,"cn":"beijing","nid":999,"rc":0,"nn":"index"};</script><script>var $pei={"i":"13","w":"11.4073","s":2,"q":"1.4506+6","c":"oUserBlackList._100[LOCAL]\neShop.1767586_0\noProfile.23189950_0\neCityIdBizConfig.c2_0\noUnreadMsgCount.23189950_0\n"}</script>

 <script type="text/javascript">
 var page = {

         p: "HESGWIZVVIVHAJ",
         m: $("ShopGMap"),
         shopId:"1767586",
         msg:"<strong><a href=\"/shop/1767586\" class=\"BL\">长虹影城</a></strong><br />东城区隆福寺街75号",
         ClickScript:false
 };
 </script>
 var Map = new Class(
 {
     ......,
     options:
     {
         css: null, zoom: 0, scale: 0, overview: 0, hold: true, drag: true, click: true, flow: false,
         wheel: true, scaleLevel: null, contains: false, settings: {
             digi: 16, add: 10, plus: 7, cha: 36, center: {
                 lat: 34.957995, lng: 107.050781, isDef: true
             }
         },
         imgPath: "http://i1.dpfile.com/s/img/gmap/", draggerIcon: "dragger", draggerText: "拖动此图标在地图上标注位置"
     },
     ......,
     decode: function(C) {
         var I = -1;
         var H = 0;
         var B = "";
         var J = C.length;
         var G = C.charCodeAt(J - 1);
         C = C.substring(0, J - 1);
         J--;
         for (var E = 0; E < J; E++) {
             var D = parseInt(C.charAt(E), this.options.settings.cha) - this.options.settings.add;
             if (D >= this.options.settings.add) {
                 D = D - this.options.settings.plus
             }
             B += (D).toString(this.options.settings.cha);
             if (D > H) {
                 I = E;
                 H = D;
             }
         }
         var A = parseInt(B.substring(0, I), this.options.settings.digi);
         var F = parseInt(B.substring(I + 1), this.options.settings.digi);
         var L = (A + F - parseInt(G)) / 2;
         var K = (F - L) / 100000;
         L /= 100000;
         return {
             lat: K, lng: L
         }
     },
     ......
 }