Updating [minx], [maxx], [miny], [maxy] variables with Javascript
Richard Greenwood
richard.greenwood at GMAIL.COM
Fri Dec 24 11:29:11 PST 2004
On Wed, 22 Dec 2004 11:56:28 -0700, Sean Gillies <sgillies at frii.com> wrote:
> On Dec 22, 2004, at 10:40 AM, Shanton, James A wrote:
>
> > Is there a way I can update [minx], [maxx], [miny], [maxy] CGI template
> > variables with Javascript ?
> >
> > I'm trying to implement image swapping with jbox.
> >
> > Image swapping works the first time I zoom in, but the second time I
> > zoom
> > in, the coordinates on the template are not updated.
> >
> > I've tried hidden variables on the template and updating those, but I
> > keep
> > getting NaN and weird numbers like -79.7097-6.31680 for longitude
> >
> > Thanks !
> >
> > Jim Shanton
When you image swap the client page is only requesting an image, so
the templae file and it's [template_variables] are not processed. You
need to do the calculations on the client (typically with javascript)
or make another request to mapserver to do the calculations for you
(which sort of defeats the purpose of image swapping).
Regards,
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
More information about the MapServer-users
mailing list