Hello forum, 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.
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: 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: ("OpenLayersDiv113")@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/EFF25A1D94537E851EFC97B149E82 FBE.cache.html:20414 $setMapCenter([object Object],"26.474735017582,60.399004250003","9")@http://localhost:8080/wx- sample/EFF25A1D94537E851EFC97B149E82FBE.cache.html:20109 $applyUserProperties([object Object],[object Object])@http://localhost:8080/wx-sample/EFF25A1D94537E851EFC97B149E82FB E.cache.html:19974 In the case above, I am passing in the int of 9. I'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's center), and I get the same error there as well. Thanks in advance for any help or advice you can provide, Michael
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
