關於部落格
「 相本、程式....Not worth a rap 。」
  • 16696

    累積人氣

  • 0

    今日人氣

    0

    訂閱人氣

GMap search

Local search Sample
←原始html的sample檔
←原始的gmlocalsearch.js檔(記得把副檔名"txt"改"js")

php_nuke_map的index.php修改如下:
顏色的為新增更改的部份


 <td colspan="3" align="center">    
      <style type="text/css">    
        @import url("/modules/Nuke_Map/gsearch.css");
        @import url("/modules/Nuke_Map/gmlocalsearch.css");
      </style>
     <script src="http://maps.google.com/maps?file=api&v=2.s&key=$apikey" type="text/javascript"></script>
     <script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0" type="text/javascript"></script>
     <script src="/modules/Nuke_Map/gmlocalsearch.js" type="text/javascript"></script>     
          <div id="map" style="width: 100%; height: 100%; color:black"></div >          
           <br />
     <script type="text/javascript">

=======================================================================
function loadMap()
     {
      var map = new GMap2(document.getElementById("map"));      
      map.addControl(new GLargeMapControl());
      map.setCenter(new GLatLng(23.5, 121.46), 7);
      map.addControl(new google.maps.LocalSearch(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,550)));
      
       new GSize 為從右下角起始的距離計算

------------------------------------------------------------------------------------------------------------------------------
{ 2008/08/19__補充 }
檔案位置:modules/Nuke_Map/gmlocalsearch.js

"更多結果"及"清除結果"等字樣在以下:(約第531行)
// NOW, take the URL and nuke from &latlnt.*&near ->&near
 var newUrl = bestResultUrl.replace(/&latlng=.*&near/,"&near");
 var moreDiv = createDiv(null, css.more_results);
 var alink = createLink(newUrl, GSearch.strings["more-results"],
                         this.linkTarget, css.more_results);
  moreDiv.appendChild(alink);
  var clearDiv = createDiv(GSearch.strings["clear-results-uc"],
                           css.clear_results);
  clearDiv.onclick = methodClosure(this,
                                      LocalSearch.prototype.goIdle,
                                      []);
第550行
  moreTd.appendChild(moreDiv);
  prevNextTd.appendChild(this.prevNext);
  clearTd.appendChild(clearDiv);


openInfoWindow在第610~613行,暫時先註解掉
  /*if (opt_suppressInfoWindow == null ||
      opt_suppressInfoWindow == false ) {
    result.marker.openInfoWindow(result.getHtml(), {maxWidth:300});
  }*/
相簿設定
標籤設定
相簿狀態