<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<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 face=Arial
color=#0000ff size=2>format : 'png',</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=296010621-14082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=296010621-14082008><FONT face=Arial
color=#0000ff size=2>Arnd Wippermann</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <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>
<DIV></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 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 class=moz-txt-link-abbreviated href="mailto:greg@ergonosis.com">greg@ergonosis.com</A>
| 360.774.6848
|</PRE></BODY></HTML>