<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Trebuchet MS";
color:blue;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Venkat,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>The Mapscript
API Reference (<a href="http://mapserver.gis.umn.edu/docs/reference/mapscript">http://mapserver.gis.umn.edu/docs/reference/mapscript</a>)
is a great resource. If you jump to the layerObj (<a
href="http://mapserver.gis.umn.edu/docs/reference/mapscript/index_html#layerobj">http://mapserver.gis.umn.edu/docs/reference/mapscript/index_html#layerobj</a>)
you will see there is an extent property. My suggestion for how to zoom to the
extents of a layer would be to find that layer in the mapObj (<a
href="http://mapserver.gis.umn.edu/docs/reference/mapscript/index_html#mapobj">http://mapserver.gis.umn.edu/docs/reference/mapscript/index_html#mapobj</a>)
grab the layerObj.extent and pass it’s pieces to the mapObj.setExtent
method.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>BTW – that
method signature for mapObj.setExtent appears to have a typo. The second miny
should be maxx.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>For example: <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Dim l as
layerObj = youMap.getLayerByName(“yourlayername”)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>yourMap.setExtent(l.extent.minx,
l.extent.miny, l.extent.maxx, l.extent.maxx)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'>Hope that helps,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=2 color=navy face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:navy'>David Lowther<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=2 color=blue face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:blue'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> venkat [mailto:ven.tammineni@gmail.com]
<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, March 26, 2008
7:29 AM<br>
<b><span style='font-weight:bold'>To:</span></b> mapserver-dev@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Cc:</span></b>
mapserver-users@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [mapserver-users] Zoom to
Layer C# asp.net</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Dear All,<br>
<br>
I am developing one webapplication using C# asp.net.I want to sample for
zoom to layer.how can i implement.and where can i get the code or any syntax
help.<br>
<br>
I am waiting for your great response.<br>
<br>
Advanced thanks.<br>
<br>
Regards.<br>
Venkat<o:p></o:p></span></font></p>
</div>
</body>
</html>