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