[OpenLayers-Users] Getting paramaters from events

Keith kweber at archetypecorp.com
Tue Mar 6 12:29:17 EST 2007


I'm having trouble passing parameters through an event call.  

 

According to the browse repository:  you should be able to retrieve previous
parameters from the callback function ( in this case "this.x/y"  ).

 

I haven't had any luck with this so far though (this.x/y are "undefined").
Can anybody provide me with the appropriate way of retrieving parameters (as
passing them isn't an option).

 

I've included the "dumbed-down" debug code below.

 

 

<!---------------------------------------------------------------------->

            

function addMarker(x,y,layer) {

                                                

            marker = new OpenLayers.Marker(

                        new OpenLayers.LonLat(x,y),

                        new
OpenLayers.Icon("/kamap/mapserver/images/AQUA.png",new
OpenLayers.Size(20,34))

            );

                                    

            layer.addMarker(marker);

            marker.events.register("mousedown", marker, mousedown);

}

                        

<!----------------------------------------------------------------------->

 

function mousedown(evt) {

 


                document.write("DEBUG LINE : " + this.x);

                document.write("____DEBUG LINE : " + this.y);

                                    

}

<!---------------------------------------------------------------------->

 

 

 

Thanks,

 

Keith Weber
Tech Support
Archetype, Inc.
205.443.6560 office
334.669.2522 mobile
kweber at archetypecorp.com

 

 


The information transmitted is the property of Archetype, Inc. and is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Statements and opinions expressed in this e-mail may not represent those of the company.  Any review, retransmission, dissemination and other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, received late or incomplete, or could contain viruses. The sender therefore does not accept liability for any error or omission in the contents of this message, which arises as a result of e-mail transmission.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070306/2fd224ee/attachment.html


More information about the Users mailing list