<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Arnd,<br>
<br>
I solved this by making a call to map.zoomToExtent(). I think I hit
reply instead of reply-all when I posted my solution; so it only went
to Chris, instead of the list.<br>
<br>
Thanks!<br>
<br>
Greg<br>
<br>
Arnd Wippermann wrote:
<blockquote cite="mid:E1KTk2h-00072Z-00@smtp08.web.de" type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2800.1106" name="GENERATOR">
<div dir="ltr" align="left"><span class="296010621-14082008">instead </span>format:
format,<span class="296010621-14082008"> try something like this:</span><br>
</div>
<div dir="ltr" align="left"><span class="296010621-14082008"><font
color="#0000ff" face="Arial" size="2">format : 'png',</font></span></div>
<div dir="ltr" align="left"><span class="296010621-14082008"></span> </div>
<div dir="ltr" align="left"><span class="296010621-14082008"><font
color="#0000ff" face="Arial" size="2">Arnd Wippermann</font></span></div>
<br>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="de">
<hr tabindex="-1"><font face="Tahoma" size="2"><b>Von:</b>
<a class="moz-txt-link-abbreviated" href="mailto:users-bounces@openlayers.org">users-bounces@openlayers.org</a> [<a class="moz-txt-link-freetext" href="mailto:users-bounces@openlayers.org">mailto:users-bounces@openlayers.org</a>] <b>Im
Auftrag von </b>Greg Ederer<br>
<b>Gesendet:</b> Donnerstag, 14. August 2008 22:23<br>
<b>An:</b> Christopher Schmidt<br>
<b>Cc:</b> Openlayers Users List<br>
<b>Betreff:</b> Re: [OpenLayers-Users] this.initialize is undefined<br>
</font><br>
</div>
Thanks, Chris.<br>
<br>
I have modified my JavaScript code as follows:<br>
<br>
function init()<br>
{<br>
format = 'image/png';<br>
map = new OpenLayers.Map("map");<br>
wms = new OpenLayers.Layer.WMS(<br>
"esv:countries - Tiled", <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="http://localhost:8080/geoserver/wms">"http://localhost:8080/geoserver/wms"</a>,<br>
{<br>
styles: '',<br>
layers: 'esv:countries',<br>
width: '800',<br>
height: '362',<br>
srs: 'EPSG:4326',<br>
format: format,<br>
tiled: 'true',<br>
tilesOrigin : "-198,-98.68117980957031"<br>
},<br>
{buffer: 0}<br>
);<br>
<br>
<br>
map.addLayer(wms);<br>
}<br>
<br>
The page now loads without errors, and the pan and zoom controls are
displayed; but the esv:countries layer does not appear.<br>
<br>
Any ideas?<br>
<br>
Thanks!<br>
<br>
Greg<br>
<br>
Christopher Schmidt wrote:
<blockquote cite="mid:20080814201351.GA9772@metacarta.com" type="cite">
<pre wrap="">On Thu, Aug 14, 2008 at 01:08:31PM -0700, Greg Ederer wrote:
</pre>
<blockquote type="cite">
<pre wrap="">function init()
{
map = OpenLayers.Map("map");
wms = new OpenLayers.Layer.WMS(
</pre>
</blockquote>
<pre wrap=""><!---->
^^^ Compare these two lines.
(You're missing a 'new' before the Map() call.)
Regards,
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:greg@ergonosis.com">greg@ergonosis.com</a>
| 360.774.6848
|</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| <a class="moz-txt-link-abbreviated" href="mailto:greg@ergonosis.com">greg@ergonosis.com</a>
| 360.774.6848
|</pre>
</body>
</html>