When you use the map.event.register, I think the "map" object is passed as context variable. So in the "onClick" function you have it in "this.map". 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 <<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a>>:<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. 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>
> Dear all,<br>
><br>
> Is it possible to get the name of the map that fired the cliecked<br>
> event?<br>
><br>
> I can get<br>
><br>
> onClick:<br>
><br>
> function(evt) {<br>
><br>
> var output = document.getElementById(this.key + "Output");<br>
><br>
> var msg = "click " + evt.xy;<br>
> output.value = output.value + msg +<br>
><br>
> "\r\n";<br>
> },<br>
><br>
> the x and y but how about the map name? or maybe div id?<br>
><br>
><br>
> Cheers<br>
><br>
> Dan<br>
><br>
><br>
><br>
> --<br>
> Radiceski Dan<br>
> University of Wollongong<br>
> Australia<br>
> SIFE - UOW Chapter - Alumni<br>
> CASUAL ACADEMIC STAFF TEACHING - UOW SITACS<br>
> (School of Information Technology and Computer Science,University of<br>
> Wollongong)<br>
> Univeristy of Wollongong - Alumni<br>
</div></div><div class="Ih2E3d">> _______________________________________________<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>
<br>
<br>
</div>__________________________________________<br>
<font color="#888888"><br>
Paul Spencer<br>
Chief Technology Officer<br>
DM Solutions Group Inc<br>
<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>