coordinates with jBox

Jachym Cepicky jachym.cepicky at CENTRUM.CZ
Tue Jul 26 02:59:20 EDT 2005


hallo,
On Mon, Jul 25, 2005 at 09:17:54PM -0600, Richard Greenwood wrote:
> > [...] 
> Hello Jáchym,
> 
> When lineon == true, measure_handler() will be called when user clicks 
> mouse. measure_handler() does not return mouse coordinates, but if you 
> set applet parameter verbose=true, then the javascript handler 
> mouseenter_handler() will be called each time the mouse moves more than 
> 'jitter' pixels. So save these coordinates in js variables, then fetch 
> them in measure_handler().
> 
> Regards,

Good hint. But the measure_handler stores *all* the values, depending
on jitter and *not* on mouse click. All the coordinates, over which I
move the mouse will be saved.

I need only those of them, which are "under" the mouse click. 

In measure_handler():

    ...
      
                if (document.mapserv.tool.value == "analyze") {
                      document.mapserv.points.value = document.forms[0].points.value + document.forms[0].curr_point.value;
                      //console(document.mapserv.points.value );
                }

    ...

How to do this?

Thanks

Jachym
-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/



More information about the mapserver-users mailing list