<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    真善美

    勇于承擔(dān)責(zé)任; 如果你做不到,要提前跟別人說明,不要等到事情發(fā)生后再解釋。

      BlogJava :: 首頁 ::  :: 聯(lián)系 :: 聚合  :: 管理 ::
      55 隨筆 :: 0 文章 :: 29 評論 :: 0 Trackbacks

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    <html xmlns="http://www.w3.org/1999/xhtml">  
    <head>  
    <meta http-equiv="Content-Type" content="text/html; charset=GBK" />  
    <title>拉框查詢</title>  
     
    <script type="text/javascript" src="http://app.mapabc.com/apis?&t=ajaxmap&v=2.1.2&key=b0a7db0b3a30f944a21c3682064dc70ef5b738b062f6479a5eca39725798b1ee300bd8d5de3a4ae3|29e8ed1f7f6a97d8e99fc568cea6a7dc0ccd920856e07c0718b9885faf7551a18141699c81f526d7"></script>  
     
    <script type="text/javascript">  
    var mapObj=null;  
    function mapInit() {  
        var mapOptions = new MMapOptions();//構(gòu)建地圖輔助類  
        mapOptions.zoom=13;//要加載的地圖的縮放級別  
        mapOptions.center=new MLngLat(116.397428,39.90923);//要加載的地圖的中心點經(jīng)緯度坐標(biāo)  
        mapOptions.toolbar = DEFAULT;//設(shè)置地圖初始化工具條  
        mapOptions.toolbarPos = new MPoint(15,15); //設(shè)置工具條在地圖上的顯示位置  
        mapOptions.overviewMap = SHOW; //設(shè)置鷹眼地圖的狀態(tài),SHOW:顯示,HIDE:隱藏(默認(rèn))  
        mapOptions.scale = SHOW; //設(shè)置地圖初始化比例尺狀態(tài),SHOW:顯示(默認(rèn)),HIDE:隱藏。  
        mapOptions.returnCoordType = COORD_TYPE_OFFSET;//返回數(shù)字坐標(biāo)  
        mapOptions.zoomBox = true;//鼠標(biāo)滾輪縮放和雙擊放大時是否有紅框動畫效果。  
        mapObj=new MMap("map",mapOptions); //地圖初始化  
        mapObj.addEventListener(mapObj,ADD_OVERLAY,addOverlayEvent1);  
    }  
    var mlls ;  
    var regionTpyeSTR="";  
    var regionId="";  
    function qryAreaInfo()
    {   alert("查詢");
        var MSearch = new MPoiSearch();  
        MSearch.setCallbackFunction(searchSearchresult_CallBack);  
     MSearch.poiSearchByRegion(MOverlay.TYPE_RECTANGLE,aa,"","");
     alert("OK");

    var aa=new Array();
    function addOverlayEvent(param)
    {   alert("draw");
        mapObj.removeAllOverlays(); 
        mapObj.setCurrentMouseTool(MConstants.PAN_WHEELZOOM);   
        var overlay=mapObj.getOverlayById(param.overlayId);     
        aa=new MLngLats(overlay.lnglatArr);
        alert(aa);

    function addOverlayEvent1(param){  
        var keywords = document.getElementById("keyword").value;  
        var MSearch = new MPoiSearch();  
        var opt = new MPoiSearchOptions();  
        opt.recordsPerPage = 10;//每頁返回數(shù)據(jù)量,默認(rèn)為10  
        opt.pageNum = 1;//當(dāng)前頁數(shù)。  
        opt.dataType = "";//數(shù)據(jù)類別,該處為分詞查詢,只需要相關(guān)行業(yè)關(guān)鍵字即可  
        opt.dataSources = DS_BASE_ENPOI;//數(shù)據(jù)源,基礎(chǔ)+企業(yè)地標(biāo)數(shù)據(jù)庫(默認(rèn))  
        MSearch.setCallbackFunction(searchSearchresult_CallBack);  
        var overlay=mapObj.getOverlayById(param.overlayId);  
        switch(overlay.TYPE){  
            case "Polygon":  
                mapObj.removeOverlayById(regionId);  
                regionId=param.overlayId;  
                MSearch.poiSearchByRegion(MOverlay.TYPE_POLYGON,new MLngLats(overlay.lnglatArr),keywords,opt);  
            break;  
            case "Rectangle":  
                mapObj.removeOverlayById(regionId);  
                regionId=param.overlayId;  
                MSearch.poiSearchByRegion(MOverlay.TYPE_RECTANGLE,new MLngLats(overlay.lnglatArr),keywords,opt);  
                aa=new MLngLats(overlay.lnglatArr);
                alert(aa);
            break;  
            case "Circle":  
                mapObj.removeOverlayById(regionId);  
                var region = overlay.bounds.southWest.lngX+","+overlay.bounds.northEast.latY+","+overlay.bounds.northEast.lngX+","+overlay.bounds.southWest.latY;  
                var arr1 = region.split(",");  
                var regionArr=new Array();  
                for(var i = 0 ;i<=arr1.length-2;){  
                        var mll =new MLngLat(arr1[i],arr1[i+1]);  
                        regionArr.push(mll);  
                        i=i+2;  
                }  
                regionId=param.overlayId;  
                MSearch.poiSearchByRegion(MOverlay.TYPE_CIRCLE,new MLngLats(regionArr),keywords,opt);  
            break;  
            default:  
            break;  
        }  
    }
    var resultCount=10;  
    function searchSearchresult_CallBack(data){  
        mapObj.setCurrentMouseTool(PAN_WHEELZOOM);  
        var resultStr="";  
        if(data.error_message != null){  
            resultStr="查詢異常!"+data.error_message;  
        }else{  
        switch(data.message){  
            case 'ok':  
                var marker = new Array();  
                if(data.searchresult.record==0){  
                    resultStr = "未查找到任何結(jié)果!<br />建議:<br />1.請確保所有字詞拼寫正確。<br />2.嘗試不同的關(guān)鍵字。<br />3.嘗試更寬泛的關(guān)鍵字。";  
                }else{  
                    resultCount=data.searchresult.list.length;  
                    for (var i = 0; i < data.searchresult.list.length; i++) {  
                        resultStr += "<div id='divid"+(i)+"' onclick=\"javascript:var s=mapObj.setCenter(new MLngLat('"+ data.searchresult.list[i].x +"','"+ data.searchresult.list[i].y +"'));var t = mapObj.openOverlayTip('"+(i)+"');\" style=\"font-size: 13px;cursor:pointer;padding:2px 0 10px 5px;\">"+(i+1)+"、"+data.searchresult.list[i].name+"<br/>";  
     
                        resultStr += TipContents(data.searchresult.list[i].type,data.searchresult.list[i].address,data.searchresult.list[i].tel);  
                        resultStr += "<br />城市:"+data.searchresult.list[i].citycode + "<br \/></div>";  
     
                        var markerOption = new MMarkerOptions();  
                        markerOption.imageUrl ="http://code.mapabc.com/images/lan_1.png";  
     
                        var tipOption = new MTipOptions();  
                        tipOption.title=(i+1) + ". "+ data.searchresult.list[i].name;  
                        var tipC = "<br />"+TipContents(data.searchresult.list[i].type,data.searchresult.list[i].address,data.searchresult.list[i].tel)  
                        tipOption.content=tipC;//tip內(nèi)容  
                        tipOption.borderStyle.thickness=2;  
                        tipOption.borderStyle.color= 0x005cb5;  
                        tipOption.borderStyle.alpha=1;  
                        tipOption.titleFontStyle.name="Arial";  
                        tipOption.titleFontStyle.size=12;  
                        tipOption.titleFontStyle.color= 0xffffff;  
                        tipOption.titleFontStyle.bold=true;  
                        tipOption.contentFontStyle.name="Arial";  
                        tipOption.contentFontStyle.size=13;  
                        tipOption.contentFontStyle.color= 0x000000 ;  
                        tipOption.contentFontStyle.bold=false;  
                        tipOption.fillStyle.color= 0xFFFFFF; //填充色  
                        tipOption.fillStyle.alpha=1;  
                        tipOption.titleFillStyle.color=0x005cb5;  
                        tipOption.titleFillStyle.alpha=1;  
     
                        markerOption.tipOption = tipOption;  
                        markerOption.canShowTip=true;  
                        var mar = new MMarker(new MLngLat(data.searchresult.list[i].x,data.searchresult.list[i].y),markerOption);  
                        mar.id=(i);  
                        marker.push(mar);  
                    }  
                    mapObj.addOverlays(marker,true);  
                    mapObj.addEventListener(mapObj,TIP_OPEN,openTip);  
                }  
            break;  
            case 'error':  
                resultStr= "<div class=\"default\"><div class=\"default_title\">網(wǎng)絡(luò)忙!請重新嘗試!</div><div class=\"d_link\"><div class=\"d_right\"></div><div class=\"suggest\"><strong>建議:</strong><br />如果您刷新頁后仍無法顯示結(jié)果,請過幾分鐘后再次嘗試或者與我們的服務(wù)人員聯(lián)系。<br />Email:service@mapabc.com <br />電話:400 810 0080</div></div></span>錯誤信息:"+data.message+"</div>";  
            break;  
            default:  
                resultStr= "<div class=\"default\"><div class=\"default_title\">對不起!網(wǎng)絡(luò)繁忙!請稍后重新嘗試!</div><div class=\"d_link\"><div class=\"d_right\"></div><div class=\"suggest\"><strong>建議:</strong><br />如果您刷新頁后仍無法顯示結(jié)果,請過幾分鐘后再次嘗試或者與我們的服務(wù)人員聯(lián)系。<br />Email:service@mapabc.com <br />電話:400 810 0080</div></div></span>錯誤信息:"+data.message+"</div>";  
            }  
        }  
        document.getElementById("result").innerHTML = resultStr;  
    }  
    function TipContents(type,address,tel){  
        if (type == "" || type == "undefined" || type == null || type == " undefined" || typeof type == "undefined") {  
            type = "暫無";  
        }  
        if (address == "" || address == "undefined" || address == null || address == " undefined" || typeof address == "undefined") {  
            address = "暫無";  
        }  
        if (tel == "" || tel == "undefined" || tel == null || tel == " undefined" || typeof address == "tel") {  
            tel = "暫無";  
        }  
        var str ="地址:" + address + "<br>電話:" + tel + " <br>類型:"+type;  
        return str;  
    }  
    function openMarkerTipById1(pointid,thiss){  //根據(jù)id打開搜索結(jié)果點tip  
        thiss.style.background='#CFD6E8';  
        //mapObj.openOverlayTip(pointid);  
    }  
    function onmouseout_MarkerStyle(pointid,thiss) {//鼠標(biāo)移開后點樣式恢復(fù)  
       thiss.style.background="";  
    }  
    function openTip(param){  
        var n = "divid"+(param.overlayId);  
        for (var i = 0; i < resultCount; ++i){  
            var id="divid"+i;  
            document.getElementById(id).style.background='';  
            document.getElementById(id).onmouseout = function(){this.style.backgroundColor='';};  
        }  
        document.getElementById(n).style.background='#CFD6E8';  
        document.getElementById(n).onmouseout = function(){this.style.backgroundColor='#CFD6E8';};  
    }  
    </script>  
    </head>  
    <body onload="mapInit();">  
    <table width="989"  border="0" cellpadding="0" cellspacing="2" bgcolor="#DDDDDD">  
        <tr height="100%">  
            <td rowspan="2" style="width:750px;height:600px;"><div id="map" style="height:600px; width:750px"></div></td>  
            <td style="width:247px;border-left:1px solid #666;" valign="top" >  
            <div style="padding:5px 0px 0px 5px;font-size:12px;height:290px">  
                <div>拉框查詢<br />關(guān)鍵字:<input type="text" id="keyword" name="keyword" value="酒店"/><br />
                 <input type="button" onclick="mapObj.setCurrentMouseTool(DRAW_CIRCLE);" value="鼠標(biāo)畫圓查詢" style="width:100px"/>
                 <input type="button" onclick="mapObj.setCurrentMouseTool(DRAW_RECTANGLE);" value="鼠標(biāo)矩形查詢" style="width:100px"/>
                 <input type="button" onclick="mapObj.setCurrentMouseTool(DRAW_POLYGON);" value="鼠標(biāo)畫多邊形查詢" style="width:120px"/></div>  
                <div id="result" name="result" style="height:505px;overflow:auto;width:247px;margin-top:5px"></div>  
           </div></td>  
       </tr>  
    </table>  
    </body>  
    </html> 

    posted on 2011-02-12 09:27 真善美 閱讀(1230) 評論(0)  編輯  收藏 所屬分類: 其它
    主站蜘蛛池模板: 亚洲美女视频网站| 亚洲国产无套无码av电影| 777亚洲精品乱码久久久久久| 两个人看的www免费高清| 亚洲国产精品va在线播放| 国产精品免费αv视频| 很黄很色很刺激的视频免费| 亚洲卡一卡2卡三卡4麻豆| 色吊丝免费观看网站| 免费大片黄手机在线观看| 成人久久久观看免费毛片| 免费黄色福利视频| 亚洲大尺码专区影院| 成人免费在线观看网站| 国产91成人精品亚洲精品| 亚洲综合区小说区激情区 | 中文字幕的电影免费网站| 国产av无码专区亚洲国产精品 | 一级毛片全部免费播放| 亚洲明星合成图综合区在线| 永久免费av无码不卡在线观看| 一级毛片在线观看免费| 中文字幕在线免费看线人| 无码少妇一区二区浪潮免费| 亚洲AV无码成人精品区在线观看| 在线看片免费人成视久网| 国产亚洲福利在线视频| 亚洲区小说区图片区| 亚洲av永久无码精品三区在线4 | 亚洲一区二区久久| 国产精品久免费的黄网站| 国产免费黄色无码视频| 亚洲国产一区二区三区| 日韩视频在线观看免费| 亚洲剧场午夜在线观看| 亚洲国产成人五月综合网| 国产精品亚洲专区在线播放 | ZZIJZZIJ亚洲日本少妇JIZJIZ| 24小时日本韩国高清免费| 亚洲宅男永久在线| 国产成人无码免费视频97|