hi list, i have a problem about OpenLayers.Handler.Box i Holding the SHIFT and draw a box ,when the icon move over a custom div ,the box is interrupted by the div,i think this is because zIndex,i set many value to zIndex but not solve the problem, the custom div is like: var id = OpenLayers.Util.createUniqueID("myCarLabel_" + this.portId); var div = OpenLayers.Util.createDiv(id, null, null, null, null, null, "hidden"); div.className = 'olPopup'; div.style.zIndex = 0; var groupDiv = OpenLayers.Util.createDiv(null, null, null, null, "relative", null, "hidden");
var id = div.id + "_contentDiv"; var divSize = new OpenLayers.Size(137, 22); // 宽,高 var contentDiv = OpenLayers.Util.createDiv(id, null, divSize, null, "relative", null, "hidden"); contentDiv.className = 'olPopupContent'; contentDiv.innerHTML = this.pointName; contentDiv.style.fontFamily = "sans-serif"; contentDiv.style.fontWeight = "bold"; contentDiv.style.marginTop = "-6px"; contentDiv.style.marginLeft = "-6px"; contentDiv.style.zIndex = 0; OpenLayers.Event.observe(contentDiv, "mouseover", OpenLayers.Function.bindAsEventListener(function() { contentDiv.style.zIndex = 1; contentDiv.style.backgroundColor = '#C6E3FF'; }, contentDiv) ); OpenLayers.Event.observe(contentDiv, "mouseout", OpenLayers.Function.bindAsEventListener(function() { contentDiv.style.zIndex = 0; contentDiv.style.backgroundColor = 'transparent'; }, contentDiv) ); groupDiv.appendChild(contentDiv); div.appendChild(groupDiv); document.body.insertAdjacentElement('BeforeEnd', div); return div; both of them interrupt the box,please help me !,many thanks~~~~~~ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Handler-Box-interrupted-by-custom-div-tp5392395p5392395.html Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users