When you use the map.event.register, I think the &quot;map&quot; object is passed as context variable. So in the &quot;onClick&quot; function you have it in &quot;this.map&quot;. In the register function you can also bind more variables to that function. There are many examples about that..<br>
<br><br><br><br><br><div class="gmail_quote">2008/6/24 Paul Spencer &lt;<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Dan,<br>
<br>
I would recommend that you use firefox with the firebug extension for<br>
this kind of work as firebug allows you to set breakpoints in code and<br>
then inspect objects quite completely. &nbsp;In this case, you can set a<br>
breakpoint inside the function and look at the evt object to see what<br>
it contains - and would find what you need reasonably quickly along<br>
with lots of other useful information.<br>
<br>
Cheers<br>
<br>
Paul<br>
<div><div></div><div class="Wj3C7c"><br>
On 24-Jun-08, at 6:00 AM, Darko Radiceski wrote:<br>
<br>
&gt; Dear all,<br>
&gt;<br>
&gt; Is it possible to get the name of the map that fired the cliecked<br>
&gt; event?<br>
&gt;<br>
&gt; I can get<br>
&gt;<br>
&gt; onClick:<br>
&gt;<br>
&gt; function(evt) {<br>
&gt;<br>
&gt; var output = document.getElementById(this.key + &quot;Output&quot;);<br>
&gt;<br>
&gt; var msg = &quot;click &quot; + evt.xy;<br>
&gt; output.value = output.value + msg +<br>
&gt;<br>
&gt; &quot;\r\n&quot;;<br>
&gt; },<br>
&gt;<br>
&gt; the x and y but how about the map name? or maybe div id?<br>
&gt;<br>
&gt;<br>
&gt; Cheers<br>
&gt;<br>
&gt; Dan<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Radiceski Dan<br>
&gt; University of Wollongong<br>
&gt; Australia<br>
&gt; SIFE - UOW Chapter - Alumni<br>
&gt; CASUAL ACADEMIC STAFF TEACHING - UOW SITACS<br>
&gt; (School of Information Technology and Computer Science,University of<br>
&gt; Wollongong)<br>
&gt; Univeristy of Wollongong - Alumni<br>
</div></div><div class="Ih2E3d">&gt; _______________________________________________<br>
&gt; Dev mailing list<br>
&gt; <a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>
&gt; <a href="http://openlayers.org/mailman/listinfo/dev" target="_blank">http://openlayers.org/mailman/listinfo/dev</a><br>
<br>
<br>
</div>__________________________________________<br>
<font color="#888888"><br>
 &nbsp; &nbsp;Paul Spencer<br>
 &nbsp; &nbsp;Chief Technology Officer<br>
 &nbsp; &nbsp;DM Solutions Group Inc<br>
 &nbsp; &nbsp;<a href="http://www.dmsolutions.ca/" target="_blank">http://www.dmsolutions.ca/</a><br>
</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/dev" target="_blank">http://openlayers.org/mailman/listinfo/dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Un saludo,<br><br>Juan Gonzalez del Pino<br>