[mapserver-users] Is there a way to add a single click zoom button
Pietro Giannini
pgiannini at bytewise.it
Thu Jan 15 02:32:52 PST 2009
Yes, but using some javascript in template html.
if you want to zoomin 2x:
<script language="JavaScript">
function zoom2x()
{
document.forms['mapserv'].imgxy.value = [mapwidth]/2 + " " + [mapheight]/2;
document.forms['mapserv'].zoom.value = 2;
document.forms['mapserv'].submit();
}
</script>
called from a button control:
<input type="button" value="zoom in 2 X" onclick="javascript:zoom2x();">
assuming that you have an hidden field named 'imgxy' and a control
(select, radio, another hidden fiedl...) named 'zoom' in a form named
'mapserv'.
ciao
.......................pg
--
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58"N 12°29'13.39"E
On Mer, Gennaio 14, 2009 18:34, boesiii wrote:
>
> by just using the map file and html template file.
> --
> View this message in context:
> http://n2.nabble.com/Is-there-a-way-to-add-a-single-click-zoom-button-tp2158109p2158109.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list