<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    A new piece of the puzzle: <br>
    <br>
    If I turn off the layer, and click in the spot where the feature
    used to be, the popup appears.<br>
    <br>
    If I turn off the layer, pan the map, and then click the spot where
    the feature should be (in its new position) the popup does not
    appear and allows click events to layers underneath the Canvas
    layer.<br>
    <br>
    Any idea why the Canvas layer somehow stays on the map unless I pan
    the map? <br>
    <br>
    I'm looking at the LayerSwitcher code to see how exactly it turns a
    layer off to see if something can be added there to completely wipe
    away the canvas.<br>
    <br>
    -Mike<br>
    <pre wrap="">Message: 1
Date: Wed, 27 Jun 2012 14:49:08 -0400
From: Mike Ryan <a class="moz-txt-link-rfc2396E" href="mailto:mr@mry4n.net"><mr@mry4n.net></a>
To: <a class="moz-txt-link-abbreviated" href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a>
Subject: Re: [OpenLayers-Users] Vector Layer w/ Canvas Renderer Not
        Respecting Other Layers
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:4FEB55A4.70304@mry4n.net"><4FEB55A4.70304@mry4n.net></a>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"

Following up on this, since I haven't heard anything. I've played around 
with the canvas hit detection example here:

<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>

and did the following:

- made an overlay layer with some of features so that I could turn the 
layer on/off
- added the LayerSwitcher control to the map
- added onFeatureSelect and onFeatureUnselect events to the layers so a 
popup appears when you click on the features
- the popups appear when clicking on the visible features
- AND the popups appear when clicking on the "invisible" features in the 
overlay when it is TURNED OFF

So, is this an issue with the HTML5 Canvas element itself or the way OL 
uses it to render Vector layers?

Does turning a Canvas layer "off" via LayerSwitcher require some extra code?

-Mike


On 6/26/2012 1:42 PM, Mike Ryan wrote:
</pre>
    <blockquote type="cite" style="color: #000000;">
      <pre wrap="">When I add a Vector layer using a Canvas renderer two bad things happen:

1. Other Vector layers with points that have click events attached and 
are within the area covered by the Canvas layer are no longer 
clickable. The Canvas layers is blocking the click event.

If a click event was added to the Canvas layer, the Canvas click event 
is fired rather than the point's in the other layer.

Points in the other layer that are not within the Canvas layer area 
work properly.

2. Even when I switch off the Canvas layer with the layerswitcher, the 
Canvas layer still behaves the same way -- even though the canvas 
layer can no longer be seen.

Who's got an idea of what might be going on here?

-Mike 
</pre>
    </blockquote>
    <pre wrap="">
</pre>
  </body>
</html>