<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)">
<style>
<!--
 /* 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.EmailStyle18
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello forum,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I am very new to open layers, so my question is hopefully
obvious to others on the forum. I am using openLayers via GWT, with the GWT
open layers library, and GeoServer on the backend.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I was trying to develop some functionality where a user
could save her current map position, and when I recreated the map viewer
component on the page I could start with the map position of this user as a
preference. One of my goals was to save their zoom level along with a bounding
box for their map center. I specifically use Map.zoomTo(int) function, but in
some cases I get a null exception:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>2009-10-21 16:08:33,607 [ERROR] Uncaught exception:
com.google.gwt.core.client.JavaScriptException: (TypeError): element is null
fileName: http://localhost:8080/wx-sample/OpenLayers.js lineNumber: 512 stack:
(&quot;OpenLayersDiv113&quot;)@http://localhost:8080/wx-sample/OpenLayers.js:512
()@http://localhost:8080/wx-sample/OpenLayers.js:871
(6,5)@http://localhost:8080/wx-sample/OpenLayers.js:1278 ([object
Object])@http://localhost:8080/wx-sample/OpenLayers.js:1272 ([object Object],true,(void
0))@http://localhost:8080/wx-sample/OpenLayers.js:1264 (null,9,[object
Object])@http://localhost:8080/wx-sample/OpenLayers.js:833
(null,9)@http://localhost:8080/wx-sample/OpenLayers.js:816
(9)@http://localhost:8080/wx-sample/OpenLayers.js:852 $setMapCenter_0([object
Object],[object
Object],9)@http://localhost:8080/wx-sample/EFF25A1D94537E851EFC97B149E82FBE.cache.html:20414
$setMapCenter([object
Object],&quot;26.474735017582,60.399004250003&quot;,&quot;9&quot;)@http://localhost:8080/wx-sample/EFF25A1D94537E851EFC97B149E82FBE.cache.html:20109
$applyUserProperties([object Object],[object
Object])@http://localhost:8080/wx-sample/EFF25A1D94537E851EFC97B149E82FBE.cache.html:19974<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>In the case above, I am passing in the int of 9. I&#8217;ve
also tried a function that will give me a zoom level for a particular extent
(the bounding box I saved off that represents the user&#8217;s center), and I
get the same error there as well.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks in advance for any help or advice you can provide,
Michael<o:p></o:p></span></font></p>

</div>

</body>

</html>