<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Template example (but other demo on the web are still very useful for
basic commands):<br>
I have a div which must contain something created by Mapserver, so I
use a particular CGI variable and Mapserver constructs that element
(the legend, the reference map, ...) Use square brackets [ ] for
defining the cgi-variables.<br>
<br>
<br>
&lt;div&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; [cgi-variable]<br>
&lt;/div&gt;<br>
<br>
or if you want to view the actual scale<br>
<br>
&lt;input name="scale" value="[scale]" /&gt;<br>
<br>
Mapserver itself puts the real actual scale value in the value
attribute of the input.<br>
<br>
Hope this helps<br>
Bye, Carlo<br>
<br>
<br>
john tse ha scritto:
<blockquote
 cite="mid:871543920804171429q182d8944s676a59d89f2dcdd2@mail.gmail.com"
 type="cite">thanks for the reply, however, i've been playing around
with it the last few days and still no luck for a customized zoom
button. It would be most useful if anyone can actually show me a sample
script of how to put something similar together so that i can learn
from it. I don't get how the template fits with the CGI.<br>
  <br>
  <div class="gmail_quote">On Sun, Apr 13, 2008 at 11:20 PM, Carlo
Pelliconi &lt;<a moz-do-not-send="true"
 href="mailto:c.pelliconi@sis-ter.it">c.pelliconi@sis-ter.it</a>&gt;
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I
think you should try strarting with mapserver basic, not javascript.<br>
Mapserver CGI documentation (for functions) here: <a
 moz-do-not-send="true"
 href="http://mapserver.gis.umn.edu/docs/reference/cgi/controls"
 target="_blank">http://mapserver.gis.umn.edu/docs/reference/cgi/controls</a><br>
Then, for the template (i.e. the html which embeds the map): <a
 moz-do-not-send="true"
 href="http://mapserver.gis.umn.edu/docs/reference/templatereference/templatereference/view"
 target="_blank">http://mapserver.gis.umn.edu/docs/reference/templatereference/templatereference/view</a><br>
I've never used javascript for functions such as zoom in, because
mapserver itself has them already defined.<br>
Good work.<br>
    <br>
Carlo<br>
    <br>
    <br>
    <br>
john tse ha scritto:<br>
    <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
      <div>
      <div class="Wj3C7c">Hi,Guys<br>
      <br>
&nbsp;I'm currently doing a volunteer project and i need to get a zoom to
button to work.<br>
This is the code i have right now<br>
      <br>
&lt;html&gt;<br>
&lt;body&gt;<br>
&lt;head&gt;<br>
&lt;script type = "text/javascript"&gt;<br>
// zoom to Region<br>
      <br>
&nbsp; &nbsp;function GoRegion() &nbsp;{<br>
      <br>
// &nbsp; &nbsp;alert(document.mapserv.mapzoomarea.value);<br>
      <br>
&nbsp; &nbsp; &nbsp;document.mapserv.target="";<br>
      <br>
&nbsp; &nbsp; &nbsp;document.mapserv.mode.value="browse";<br>
      <br>
&nbsp; &nbsp; &nbsp;document.mapserv.imgext.value =
(document.mapserv.mapzoomarea.value);<br>
      <br>
&nbsp; &nbsp; &nbsp;document.mapserv.submit();<br>
&lt;/script&gt;<br>
&lt;/head&gt;<br>
      <br>
&nbsp;&lt;select name="mapzoomarea" onChange="GoRegion();"&gt;<br>
      <br>
&nbsp; &nbsp;&lt;option&gt;Zoom to Region&lt;/option&gt;<br>
      <br>
&nbsp; &nbsp;&lt;option&gt;------------------------&lt;/option&gt;<br>
      <br>
&nbsp; &nbsp;&lt;option value="5457203 487104 5451873 482304"&gt;Reserve
2&lt;/option&gt;<br>
      <br>
&nbsp; &nbsp;&lt;option value="5435308 491431 5434498 490403"&gt;Reserve
4&lt;/option&gt;<br>
      <br>
&nbsp; &nbsp;&lt;option value="5425919 541,907 5502970 444168"&gt;Musqueam
Statement Of Intent&lt;/option&gt;<br>
      <br>
&nbsp; &nbsp;&lt;option value="5435189 475830 5457751 504449"&gt;Richmond
Boundary&lt;/option&gt;<br>
      <br>
&nbsp; &nbsp;&lt;option value="5448859 481843 5463269 500122"&gt;Vancouver
Boundary &lt;/option&gt;<br>
&nbsp; &nbsp; &nbsp;&lt;option value="5432692 482228 5457268 515426"&gt;North Arm
Fraser River &lt;/option&gt;<br>
      <br>
&nbsp; &nbsp;&lt;/select&gt;<br>
&nbsp; <br>
      <br>
&lt;/body&gt;<br>
&lt;/html&gt;<br>
      <br>
it doesn't do anything, and i have no idea what's wrong with it, any
help will be much appreciated.<br>
      <br>
thanx<br>
      </div>
      </div>
------------------------------------------------------------------------<br>
      <br>
_______________________________________________<br>
mapserver-users mailing list<br>
      <a moz-do-not-send="true"
 href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
      <a moz-do-not-send="true"
 href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&nbsp;<br>
    </blockquote>
    <br>
    <br>
-- <br>
ing. Carlo Pelliconi<br>
    <a moz-do-not-send="true" href="mailto:c.pelliconi@sis-ter.it"
 target="_blank">c.pelliconi@sis-ter.it</a><br>
SIS.TER S.p.A.<br>
    <a moz-do-not-send="true" href="http://www.sis-ter.it"
 target="_blank">www.sis-ter.it</a><br>
via Mentana, 10<br>
40026 Imola (BO) Italy<br>
    <br>
ATTENZIONE!<br>
Questo documento &egrave; indirizzato esclusivamente al destinatario. Tutte le<br>
informazioni ivi contenute, compresi eventuali allegati, sono soggette<br>
a riservatezza secondo i termini del D.Lgs. 196/2003 in materia di<br>
"privacy" e ne &egrave; proibita l'utilizzazione da parte di altri soggetti.
Si ricorda che la diffusione l'utilizzo e/o la conservazione dei dati
ricevuti per errore costituisce violazione di carattere penale ai sensi
dell'art. 616 Codice penale (Violazione, sottrazione e soppressione di
corrispondenza). Se avesse ricevuto per errore questo messaggio, La
preghiamo cortesemente di contattare il mittente al pi&ugrave; presto e di
cancellare il messaggio subito dopo. Grazie.<br>
    <br>
ATTENTION!<br>
This message is being sent from Sis.Ter S.p.A. and may contain
information which is confidential or privileged. If you are not the
intended recipient, please advise the sender immediately by reply
e-mail and delete this message and any attachments without retaining a
copy. Any unauthorized use of the content of this message is a breach
of your duty to respect the confidentiality of the correspondence
between other persons and can expose the responsible party to civil
and/or criminal penalties (D.Lgs. 196/2003 "Tutela della privacy" e
art. 616 Codice penale "Violazione, sottrazione e soppressione di
corrispondenza"), and may constitute a more serious offence. Thanks.<br>
    <br>
ACHTUNG!<br>
Dieses Dokument ist ausschlie&szlig;lich dem Empf&auml;nger vorbehalten. Die darin
enthaltenen Informationen, auch jene in etwaigen Anlagen, gelten im
Sinne des Dekrets Nr. 196/2003 in Sachen "Privacy" als streng
vertraulich und d&uuml;rfen von anderen Personen nicht verwende werden. Wer
diese Mitteilung irrt&uuml;mlicherweise erh&auml;lt ist gebeten uns umgehend zu
informieren und anschlie&szlig;end die Mitteilung zu vernichten. Vielen Dank.<br>
    <br>
    <br>
  </blockquote>
  </div>
  <br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
ing. Carlo Pelliconi
<a class="moz-txt-link-abbreviated" href="mailto:c.pelliconi@sis-ter.it">c.pelliconi@sis-ter.it</a>
SIS.TER S.p.A.
<a class="moz-txt-link-abbreviated" href="http://www.sis-ter.it">www.sis-ter.it</a>
via Mentana, 10
40026 Imola (BO) Italy
tel     +39 0542 364034
fax     +39 0542 612130




ATTENZIONE!
Questo documento &egrave; indirizzato esclusivamente al destinatario. Tutte le
informazioni ivi contenute, compresi eventuali allegati, sono soggette
a riservatezza secondo i termini del D.Lgs. 196/2003 in materia di
"privacy" e ne &egrave; proibita l'utilizzazione da parte di altri soggetti. Si ricorda che la diffusione l'utilizzo e/o la conservazione dei dati ricevuti per errore costituisce violazione di carattere penale ai sensi dell'art. 616 Codice penale (Violazione, sottrazione e soppressione di corrispondenza). Se avesse ricevuto per errore questo messaggio, La preghiamo cortesemente di contattare il mittente al pi&ugrave; presto e di cancellare il messaggio subito dopo. Grazie.

ATTENTION!
This message is being sent from Sis.Ter S.p.A. and may contain information which is confidential or privileged. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorized use of the content of this message is a breach of your duty to respect the confidentiality of the correspondence between other persons and can expose the responsible party to civil and/or criminal penalties (D.Lgs. 196/2003 "Tutela della privacy" e art. 616 Codice penale "Violazione, sottrazione e soppressione di corrispondenza"), and may constitute a more serious offence. Thanks.

ACHTUNG!
Dieses Dokument ist ausschlie&szlig;lich dem Empf&auml;nger vorbehalten. Die darin enthaltenen Informationen, auch jene in etwaigen Anlagen, gelten im Sinne des Dekrets Nr. 196/2003 in Sachen "Privacy" als streng vertraulich und d&uuml;rfen von anderen Personen nicht verwende werden. Wer diese Mitteilung irrt&uuml;mlicherweise erh&auml;lt ist gebeten uns umgehend zu informieren und anschlie&szlig;end die Mitteilung zu vernichten. Vielen Dank.</pre>
</body>
</html>