<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi:<br> I have a problem,i can't use Navigation Control(OpenLayers.Control.Navigation()) when i have used Box Control like this :<br> var control = new OpenLayers.Control();<br> OpenLayers.Util.extend(control, {<br> draw: function () {<br> // this Handler.Box will intercept the shift-mousedown<br> // before Control.MouseDefault gets to see
it<br> this.box = new OpenLayers.Handler.Box( control,<br> {"done": this.notice},<br> {keyMask: OpenLayers.Handler.MOD_CTRL});<br> this.box.activate();<br>
},<br><br> notice: function (bounds) {<br> var ll = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom)); <br> var ur = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top)); <br> var rowlength = document.all("table1").rows.length;<br> for(var i=1;
i<rowlength;i++){<br> document.all("table1").rows[i].cells[1].bgColor = "#ffffff";<br> var x = document.all("table1").rows[i].cells[4].innerText;<br> var y = document.all("table1").rows[i].cells[5].innerText;<br>
if(x>ll.lon.toFixed(4)&&x<ur.lon.toFixed(4)&&y>ll.lat.toFixed(4)&&y<ur.lat.toFixed(4)){<br> // alert("sucess");<br> document.all("table1").rows[i].cells[1].bgColor = "#00FFFF";<br> }<br>
}<br> alert(ll.lon.toFixed(4) + ", " + <br> ll.lat.toFixed(4) + ", " + <br> ur.lon.toFixed(4) + ", " + <br> ur.lat.toFixed(4));<br>
}<br> });<br> i want them work together,how can i do ? thanks<br><br></td></tr></table><br>
<hr size=1><a href="http://cn.rd.yahoo.com/mail_cn/tagline/card/*http://card.mail.cn.yahoo.com/"> 好玩贺卡等你发,邮箱贺卡全新上线!</a>