<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Eric- yes, thanks - I had that in the working version (registered to
the map) before I started changing everything to try to get it to work
on the marker.<br>
I think I have figured out the problem.  I have several layers of
partially transparent markers (for a label), and I registered the event
with the bottom layer only.<br>
I got it to work by putting a completely transparent marker over the
whole thing and registered the event with that.<br>
I can live with this as I only have 8 markers that need this sort of
behavior.<br>
But I am surprised that the click doesn't work for the underlying
object - is this normal behavior?<br>
<br>
Tara<br>
<br>
Eric Lemoine wrote:
<blockquote
 cite="mid:5ec103de0804062150vad42d5bu6b96d8f26885be78@mail.gmail.com"
 type="cite">
  <pre wrap="">On Mon, Apr 7, 2008 at 5:17 AM, Tara Athan <a class="moz-txt-link-rfc2396E" href="mailto:tara_athan@alt2is.com">&lt;tara_athan@alt2is.com&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I am confused about how to register an event on a marker.
 I have a marker layer at a coarse resolution, with markers assigned to
 different variables.
 I would like to have a click on the marker cause  a zoom in to that
 location, plus a replacement of the makers with a new set of markers
 that show more detail for that location. I am using code like this

        function handleMarkerClickEU(evt) {
        map.setCenter(new OpenLayers.LonLat(13.000000,51.000000), 3);
        var vols_cyball = new OpenLayers.Layer.Markers( 'volunteers
 living in Europe (balloons)');
        var vols_cynumb = new OpenLayers.Layer.Markers( 'volunteers
 living in Europe (numbers)');
        var vols_cytext = new OpenLayers.Layer.Text( "text", {location:
 "../data/volsTextCYEU_utf8.csv"});
        map.addLayers([vols_cyball, vols_cynumb, vols_cytext]);
        &lt;?php include 'volsBalloonsAndNumbersCYEU_utf8.php';  ?&gt;

        map.removeLayer(vols_ctball);
        map.removeLayer(vols_ctnumb);
        }

 var markerEU = new OpenLayers.Marker(new
 OpenLayers.LonLat(13.000000,51.000000),icon);
 vols_ctball.addMarker( markerEU);
 markerEU.events.register("onclick" , markerEU, handleMarkerClickEU);
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Hi, try "click" instead of "onclick" ?

--
Eric

  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
My e-mail delivery has been unreliable lately, so I am asking for
return receipts from all my email messages.
OK'ing the return receipt lets me know that my message was delivered.
Thank you.

Tara Athan
Principal, Alternatives to Invasive Species
tara_athan [AT] alt2is.com
707-485-1198
PO Box 415
Redwood Valley, CA 95470</pre>
</body>
</html>