Updating [minx], [maxx], [miny], [maxy] variables with Javascript

Sean Gillies sgillies at FRII.COM
Wed Dec 22 13:56:28 EST 2004


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
>

MapServer's templating can let you write Javascript:

<script>
...
var minx = [minx];
...
</script>

is that what you're looking for?

Sean


--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies



More information about the mapserver-users mailing list