<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I've posted this problem to the users list but it probably makes
more sense to post it here.<br>
<br>
I'm having problems with Vector layers that use a Canvas renderer. <br>
<br>
1. If the Canvas layer is placed below other layers (not rendered as
Canvases) it doesn't allow click events (onFeatureSelect, etc.) to
the overlapping layers ABOVE it.<br>
<br>
2. If the Canvas layer has events on it they persist even when I
turn off the Canvas layer using the LayerSwitcher and it continues
to block the events of the layers above it.<br>
<br>
3. The events do not persist if I turn the Canvas layer off and then
pan the map.<br>
<br>
I used/altered the Canvas hit detection example to verify some of
the things above:<br>
<pre wrap=""><a class="moz-txt-link-freetext" href="http://dev.openlayers.org/releases/OpenLayers-2.11/examples/canvas-hit-detection.html">http://dev.openlayers.org/releases/OpenLayers-2.11/examples/canvas-hit-detection.html</a>
My alterations to canvas.js - <a href="http://pastebin.com/tAV9Dvcx">http://pastebin.com/tAV9Dvcx</a></pre>
<br>
I'm wondering if something could be altered in LayerSwitcher.js 's
updateMap function to address this?<br>
<br>
updateMap: function() {<br>
...<br>
// set the correct visibilities for the overlays<br>
for(var i=0, len=this.dataLayers.length; i<len; i++) {<br>
var layerEntry = this.dataLayers[i]; <br>
layerEntry.layer.setVisibility(layerEntry.inputElem.checked);<br>
}<br>
<br>
Is it possible that setVisibility(false) when applied to a Canvas
layer does not fully remove the layer from the map?<br>
<br>
And even if that's correct, I still don't understand why the layer
order is not respected.<br>
<br>
Any thoughts?<br>
<br>
-Mike<br>
</body>
</html>