지도 내비게이션 도구

3059 단어 extUP
Ext.namespace('Ext.ux.CAF.GIS');

Ext.ux.CAF.GIS.MapNavigation=function(config) {
    Ext.apply(this, config);
};
Ext.extend(Ext.ux.CAF.GIS.MapNavigation, Ext.util.Observable, {
    init:function(panel) {
  Ext.apply(panel, {
            onRender:panel.onRender.createSequence(function(ct, position) {
             var navigateDiv = Ext.DomHelper.append(this.el,
                {
                    tag: 'div', style:'position:absolute; z-index:23; top: 0px;'
                });
                var navHtml = '<table border="0" cellpadding="0" cellspacing="2">'+
          '<tbody><tr><td></td>'+
          '<td><img src="../images/gistools/navigate/up.gif" style="" onclick="clickMove(\'up\')" title=" " height="20" width="20"></td>'+
          '<td></td></tr><tr>'+
          '<td><img src="../images/gistools/navigate/left.gif" style="" onclick="clickMove(\'left\')" title=" " height="20" width="20"></td> '+
          '<td><img src="../images/gistools/navigate/zoom.gif" style="" onclick="fullExt();" title=" " height="20" width="20"></td> '+
          '<td><img src="../images/gistools/navigate/right.gif" style="" onclick="clickMove(\'right\')" title=" " height="20" width="20"></td>'+ 
          '</tr><tr><td></td>'+
          '<td><img src="../images/gistools/navigate/down.gif" style="" onclick="clickMove(\'down\')" title=" " height="20" width="20"></td> '+
          '<td></td></tr><tr><td></td>'+
          '<td><img src="../images/gistools/navigate/zoom_in.gif" style="" onclick="zoomIn();" title=" " height="20" width="20"></td> '+
          '<td></td></tr><tr><td></td>'+
          '<td><img src="../images/gistools/navigate/zoom_out.gif" style="" onclick="zoomOut();" title=" " height="20" width="20"></td> '+
          '<td></td></tr></tbody></table>';
                if(navigateDiv)
                {
                 Ext.DomHelper.insertHtml('beforeEnd',navigateDiv,navHtml);
                }
            })
        });
     }
});

비교적 원시적인 방법으로 지도 내비게이션의 작은 도구막대를 실현하다.

좋은 웹페이지 즐겨찾기