JBOX - distance measuring
Steve Lime
steve.lime at DNR.STATE.MN.US
Tue Mar 14 09:31:59 PST 2006
It's been awhile since I've used jbox but if it behaves like dbox then typically you need to somehow trigger the drawing. I believe there is a method called lineon() that you would call to get into that mode.
The way I've done this is by using a measure button that calls the lineon() method. There's also a lineoff() method. You may also need to set verbose to true when you initialize the applet. Assuming you have a jbox called myBox, then you could test with:
Measure: <a href="myBox.lineon()">on</a>/<a href="myBox.lineoff()">off</a>
Steve
>>> Alexandre Abramides <alexandre at ACQUASOFTWARE.COM.BR> 03/14/06 8:56 AM >>>
Anyone?
----- Original Message -----
From: "Alexandre Abramides" <alexandre at ACQUASOFTWARE.COM.BR>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Tuesday, March 07, 2006 1:55 PM
Subject: [UMN_MAPSERVER-USERS] JBOX - distance measuring
> Anyone can help me?
>
> I,m trying to use the distance measuring function from jBox.
> This is the javascript function in
> http://mapserver.gis.umn.edu/docs/howto/jbox
>
> function measure_handler(name, s, t, n, a) {
> // c = 1 / 72dpi / 12inches_per_foot * 1.0003state_plane_scale_factor
> var c = 0.0011577546296296; // constant
> var f = [scale] * c; // scale factor
> if ((s>0) || (t>0)) {
> defaultStatus = "This segment = " + s*f + ", Total = "
> + t*f + ", Number of vertices = " + n ;
> }
> }
>
> and I don´t know what else i have to do.
> Should i add another "mode" to my html template? How do I use this
function
> properly?
>
> []
> Abramides.
>
More information about the MapServer-users
mailing list