2007年4月1日

          在mapEasy地圖上加入右鍵事件。


          修改文件MapEvent.js 加入代碼 MapEvent.RIGHTCLICK="event.rightclick";
          修改MapPaneWidget.js 在this.customEvent = function(eventName) {//……}中加入代碼

                    if (eventName == MapEvent.RIGHTCLICK) {
                                var _littleo=this.model;
                                mapDiv.onmousedown = function(e) {
                                   var e = e || window.event;
                                    var btnCode;
                                   
                                    if ('object' == typeof e){
                                          btnCode = e.button;
                                         
                                          if(btnCode==2) {
                                               eval("var rClick="+_littleo.events[MapEvent.RIGHTCLICK]+";");
                                               eval(rClick(e));
                                          }
                                          else{

                                              mapMDown(e, mapDiv, s);

                                          }
                                 
                                      }
                                             
                                   }

                        
                        
                          }



          示例代碼
          // 在地圖上加入右鍵事件
          MapEvent.addListener(map, MapEvent.RIGHTCLICK, function(e) {
                  var coord = MapEvent.getEventCoord(e, map);
              var marker = new Marker(coord.getPoint(), Marker.LARGE);
              map.addOverlay(marker);
              marker.setInfo("Hello! it's marker: <a href=\"http://www.hymake.com\" target=\"_blank\">#" + marker.getId() + "</a>");
          });文件

          posted @ 2007-04-01 20:36 chinajj 閱讀(1585) | 評論 (2)編輯 收藏

          2007年3月2日

          SpringXT在springmodules 中也有了。

               摘要:   閱讀全文

          posted @ 2007-03-02 11:24 chinajj 閱讀(360) | 評論 (0)編輯 收藏

          僅列出標題  
          <2025年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          導航

          統計

          常用鏈接

          留言簿(2)

          隨筆分類

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 日照市| 邢台县| 沙雅县| 雷波县| 湖南省| 江陵县| 新乡县| 白山市| 富川| 广安市| 泗水县| 称多县| 庄河市| 芒康县| 弋阳县| 定边县| 望江县| 红河县| 金乡县| 久治县| 灵石县| 许昌市| 乐山市| 惠水县| 柳林县| 沂水县| 赤峰市| 鲜城| 临汾市| 牡丹江市| 烟台市| 台州市| 通河县| 若羌县| 白水县| 乐昌市| 乌鲁木齐县| 阿克陶县| 西盟| 靖安县| 应用必备|