<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<STYLE>P.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in
}
LI.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in
}
DIV.MsoListParagraph {
MARGIN: 0in 0in 0pt 0.5in
}
P.MsoListParagraphCxSpFirst {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
LI.MsoListParagraphCxSpFirst {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
DIV.MsoListParagraphCxSpFirst {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
P.MsoListParagraphCxSpMiddle {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
LI.MsoListParagraphCxSpMiddle {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
DIV.MsoListParagraphCxSpMiddle {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
P.MsoListParagraphCxSpLast {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
LI.MsoListParagraphCxSpLast {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
DIV.MsoListParagraphCxSpLast {
LINE-HEIGHT: 115%; MARGIN: 0in 0in 0pt 0.5in
}
</STYLE>
<META name=GENERATOR content="MSHTML 8.00.6001.19393"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=104002222-07012013>You can zoom to any scale on a button press using -
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=104002222-07012013></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=104002222-07012013>map.zoomToScale("25000")</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=104002222-07012013></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=104002222-07012013>Or you can use OpenLayers.Control.NavigationHistory for
zooming to previous levels, it can be associated with a button and you can use
nav.previous to go back 1 level (or more).</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=104002222-07012013></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=104002222-07012013>Also, if you define your map extent at the beginning of
load and want to go back, get the Bounds of your map assigned to a variable,
then just map.ZoomToExtent using that variable.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=104002222-07012013></SPAN></FONT><FONT color=#0000ff size=2
face=Arial><SPAN class=104002222-07012013></SPAN></FONT><FONT color=#0000ff
size=2 face=Arial><SPAN class=104002222-07012013></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV><!-- Converted from text/rtf format -->
<P><FONT color=#000080 size=2 face=Verdana>Andrew Stewart</FONT> <BR></P><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> openlayers-users-bounces@lists.osgeo.org
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Ayrton
Araújo<BR><B>Sent:</B> January 07, 2013 2:34 PM<BR><B>To:</B>
openlayers-users@lists.osgeo.org<BR><B>Subject:</B> [OpenLayers-Users] Reset the
zoom<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV
style="FONT-FAMILY: Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','Khmer UI','Nirmala UI',Tunga,'Lao UI',Ebrima,sans-serif; FONT-SIZE: 16px">
<DIV>I want to make a button for reset the zoom status. If some user use the
zoom, will be possible to reset to the initial state.</DIV>
<DIV> </DIV>
<DIV>How is the best way to do this using JavaScript?</DIV></DIV>
<DIV>
<P>
<HR>
[This message has been scanned for security content threats and
viruses.]<BR><BR>[The City of Red Deer I.T. Services asks that you please
consider the environment before printing this e-mail.]<BR>
<P></P></DIV>
<DIV><P><HR>
This e-mail is intended for the original recipient(s) only. If you have received it in error, please advise the sender and delete this message.
</P></DIV>
</BODY></HTML>