<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16450">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>I am new to OpenLayers and to GeoServer and am
having trouble zooming to the extent of my map. Instead my map displays at
the World zoom level (or appears to). I am able to manually zoom in but
would rather do the zooming programatically.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I have a simple html page, below, and have tried
every conceivable combination of options without any luck. The one
variable that I am uncertain of is tileOrigin. I obtained this
from the GeoServer demo link, but do know if this is correct. However
leaving it out has no effect.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Does anyone out there have any insight as to what I
am doing wrong?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thanks in advance. Any help would be
appreciated.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Al Vigil</FONT></DIV>
<DIV><FONT size=2 face=Arial>albert.vigil@gmail.com</FONT></DIV>
<DIV><FONT size=3 face="Courier New"></FONT> </DIV>
<DIV>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"><!</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes">DOCTYPE</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"> <SPAN
style="COLOR: red">html</SPAN><SPAN style="COLOR: blue">></SPAN>
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office"
/><o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"><</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes">html</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"> <SPAN
style="COLOR: red">lang</SPAN><SPAN style="COLOR: blue">='en'></SPAN>
<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"><</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes">head</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes">></SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes">
<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue"><</SPAN><SPAN style="COLOR: #a31515">meta</SPAN> <SPAN
style="COLOR: red">charset</SPAN><SPAN style="COLOR: blue">='utf-8'</SPAN> <SPAN
style="COLOR: blue">/></SPAN> <o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="COLOR: blue"><</SPAN><SPAN style="COLOR: #a31515">title</SPAN><SPAN
style="COLOR: blue">></SPAN>My OpenLayers Map<SPAN
style="COLOR: blue"></</SPAN><SPAN style="COLOR: #a31515">title</SPAN><SPAN
style="COLOR: blue">></SPAN><SPAN style="mso-tab-count: 1">
</SPAN><o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue"><</SPAN><SPAN style="COLOR: #a31515">script</SPAN> <SPAN
style="COLOR: red">type</SPAN><SPAN
style="COLOR: blue">='text/javascript'</SPAN> <SPAN
style="COLOR: red">src</SPAN><SPAN
style="COLOR: blue">='OpenLayers.js'></</SPAN><SPAN
style="COLOR: #a31515">script</SPAN><SPAN
style="COLOR: blue">><o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue"><</SPAN><SPAN style="COLOR: #a31515">script</SPAN> <SPAN
style="COLOR: red">type</SPAN><SPAN
style="COLOR: blue">='text/javascript'><o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue">var</SPAN> map;<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue">var</SPAN> bounds = <SPAN style="COLOR: blue">new</SPAN>
OpenLayers.Bound(-88, 11, -84, 15);<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue">function</SPAN> init() {<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">// Setup our map
object<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN>map
= <SPAN style="COLOR: blue">new</SPAN> OpenLayers.Map(<SPAN
style="COLOR: #a31515">'map_element'</SPAN>, {});<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">// Setup our two layer
objects<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: blue">var</SPAN> wms_layer_map = <SPAN
style="COLOR: blue">new</SPAN> OpenLayers.Layer.WMS(<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: #a31515">'base layer'</SPAN>,<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN
style="COLOR: #a31515">'http://localhost:8088/geoserver/wms'</SPAN>,<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN>{<SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN><o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>layers: <SPAN
style="COLOR: #a31515">'Nicaragua:nicbase,Nicaragua:l4Roads'</SPAN>,<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>styles: <SPAN
style="COLOR: #a31515">'nicbase,l4Roads'</SPAN>,<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: green">//bbox: '-88,11,-84,15' ,<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>srs: <SPAN
style="COLOR: #a31515">'EPSG:4326'</SPAN>,<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: green">//width: '800'<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>format: <SPAN
style="COLOR: #a31515">'image/png'</SPAN>,<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>tiled: <SPAN style="COLOR: #a31515">'true'</SPAN>,<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>tilesOrigin : <SPAN
style="COLOR: #a31515">"143.60260815000004,-43.851764249999995"<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: green">//tiled: true ,<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: green">//tilesorigin: '-88,11'<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: green">//tilesorigin: '-130,24'<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN>}<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="COLOR: green">//{isBaseLayer:
true},<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 3">
</SPAN><SPAN style="COLOR: green">//{buffer: 0}<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 2">
</SPAN>);<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue">var</SPAN> nicBounds = <SPAN style="COLOR: blue">new</SPAN>
OpenLayers.Bounds(<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>-8800000, 1500000, -8400000, 1500000<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>);<SPAN
style="mso-spacerun: yes">
</SPAN><o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">// Add layer to the
map<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>map.addLayers([wms_layer_map]);<SPAN
style="COLOR: green">//,roadsl4_layer]);<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">// Add a layer switcher
control<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN>map.addControl(<SPAN style="COLOR: blue">new</SPAN>
OpenLayers.Control.LayerSwitcher({}));<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN style="COLOR: green">// Zoom the map to the
extent<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes">
</SPAN><SPAN
style="COLOR: green">//map.zoomToExtent(bounds);<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN
style="COLOR: blue">if</SPAN>(!map.getCenter()){<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: green">//map.zoomToMaxExtent();<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: green">//map.zoomTo(10);<SPAN style="mso-spacerun: yes">
</SPAN>//does not work<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="mso-spacerun: yes">
</SPAN>map.zoomToExtent(nicBounds); <SPAN style="COLOR: green">//does not
work<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 2">
</SPAN>}<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 2">
</SPAN><SPAN style="COLOR: green">//map.zoomToExtent(nicBounds);<SPAN
style="mso-spacerun: yes"> </SPAN>// does not
work<o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue"></</SPAN><SPAN style="COLOR: #a31515">script</SPAN><SPAN
style="COLOR: blue">><o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"></</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes">head</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes">><o:p></o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"><o:p> </o:p></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"><</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes">body</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"> <SPAN
style="COLOR: red">onload</SPAN><SPAN
style="COLOR: blue">='init();'><o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="COLOR: blue"><</SPAN><SPAN style="COLOR: #a31515">div</SPAN> <SPAN
style="COLOR: red">id</SPAN><SPAN style="COLOR: blue">='map_element'</SPAN>
<SPAN style="COLOR: red">style</SPAN><SPAN style="COLOR: blue">='</SPAN><SPAN
style="COLOR: red">width</SPAN>: <SPAN style="COLOR: blue">800px</SPAN>; <SPAN
style="COLOR: red">height</SPAN>: <SPAN style="COLOR: blue">600px</SPAN>;<SPAN
style="COLOR: blue">'><o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"><SPAN
style="mso-tab-count: 1"> </SPAN><SPAN
style="COLOR: blue"></</SPAN><SPAN style="COLOR: #a31515">div</SPAN><SPAN
style="COLOR: blue">><o:p></o:p></SPAN></SPAN></P>
<P
style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; TEXT-AUTOSPACE: ; mso-layout-grid-align: none"
class=MsoNormal><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"></</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes">body</SPAN><SPAN
style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes">><o:p></o:p></SPAN></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><SPAN
style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"></</SPAN><SPAN
style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 10pt; mso-no-proof: yes">html</SPAN><SPAN
style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes">></SPAN></P></DIV></BODY></HTML>