[OpenLayers-Users] this.initialize is undefined
Greg Ederer
greg at ergonosis.com
Thu Aug 14 16:08:31 EDT 2008
Hi,
I'm trying to get a minimal application working with OpenLayers and my
local GeoServer instance. I have created a FeatureType in GeoServer
called esv:countries, and I can view this using the mini-map preview
function of GeoServer.
I copied the layer instantiation code for my test application:
var map;
var wms;
// pink tile avoidance
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
// make OL compute scale according to WMS spec
OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;
function init()
{
map = OpenLayers.Map("map");
wms = new OpenLayers.Layer.WMS(
"esv:countries - Tiled",
"http://localhost:8080/geoserver/wms",
{
styles: '',
layers: 'esv:countries',
width: '800',
height: '362',
srs: 'EPSG:4326',
format: format,
tiled: 'true',
tilesOrigin : "-198,-98.68117980957031"
},
{buffer: 0}
);
map.addLayer(wms);
}
In my HTML (actually, a JSP), I have:
...
<body onload="init()">
<div id="map">
</div>
</body>
...
When I load this page, however, I get this error in Firebug:
this.initialize is undefined
http://localhost:8080/EWE/scripts/OpenLayers/OpenLayers.js
Line 69
Any suggestions?
Thanks!
Greg
--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| greg at ergonosis.com
| 360.774.6848
|
More information about the Users
mailing list