[mapserver-users] mapserver+javascript without template example?!!!
Saka Royban
sakaroyban at yahoo.com
Sun Sep 9 10:54:24 PDT 2012
Hi all.
I'm just looking for some examples of using javascript with mapserver without using html templates.
I know that there are some libraries around like OpenLayers, but i wanna see what happens in background first and then move to use these libraries.
This is what i have written which does not works: (i get a error saying MS_DEFAULT_MAPFILE_PATTERN validation failed )
<html>
<head>
</head>
<script language="JavaScript">
function zoom(){
document.forms['mapserv'].imgxy.value = "400 200";
document.forms['mapserv'].zoom.value = 2;
document.forms['mapserv'].submit();
}
</script>
<body>
<h1> A Dynamic Map </h1>
<p></p>
<h3> use form to make map dynamic + scripting </h3>
<form name="mapserv" method="GET" action="/cgi-bin/mapserv.exe">
<input type="hidden" name="imgxy" value="400 200">
<input type="hidden" name="map" value="[map]" />
<input type="hidden" name="imgext" value="[mapext]" />
<input type="hidden" name="imgxy" value="[center]" />
<input type="hidden" name="zoomsize" value="2" />
<input type="image" name="img" src="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/ms101/htdocs/ms101.map&layers=all&mode=map" onclick="zoom()"/>
</form>
</body>
Thanks in advance
<html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120909/31429d2e/attachment.htm>
More information about the MapServer-users
mailing list