<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi everyone,<br>
<br>
I'm new with openlayers, and i'm trying to create a new map with one
layer served with Geoserver, but i'm getting some problems.<br>
<br>
This is the code:<br>
<br>
<font face="FreeMono"><small>"//Definimos la variable map<br>
var map;<br>
function init() {<br>
//Opciones<br>
var options = {<br>
projection: new
OpenLayers.Projection("EPGS:900913"),<br>
units: "m"
<br>
<br>
};<br>
<br>
//Creamos un nuevo objeto map en el div con el id = map<br>
map = new OpenLayers.Map('map',options);<br>
<br>
var mapnik = new OpenLayers.Layer.OSM();<br>
<br>
<br>
<br>
//Añadir capa Geoserver Pruebas<br>
var prueba = new OpenLayers.Layer.WMS(<br>
"Test:comarca - Tiled",
<a class="moz-txt-link-rfc2396E" href="http://localhost:8080/geoserver/Test/wms">"http://localhost:8080/geoserver/Test/wms"</a>,<br>
{<br>
LAYERS: 'Test:comarca',<br>
format: 'img/png'<br>
},<br>
{ <br>
isBaseLayer: false,<br>
yx : {'EPSG:900913' : false}<br>
} <br>
);<br>
<br>
<br>
// Añadir la capa al mapa<br>
map.addLayer(mapnik);<br>
<br>
map.addLayer(prueba);<br>
<br>
<br>
//Poner el centro del mapa en estas coordenadas.<br>
map.setCenter(new
OpenLayers.LonLat(-412267.21675,4926706.34959),6);<br>
<br>
<br>
<br>
//Controles<br>
map.addControl(new
OpenLayers.Control.LayerSwitcher()); <br>
map.addControl (new OpenLayers.Control.MousePosition
());<br>
map.addControl( new OpenLayers.Control.ScaleLine());<br>
}</small>"</font><br>
<br>
But Firebug show me this error: <br>
<br>
<small><font face="FreeMono">TypeError: a is null<br>
<a class="moz-txt-link-freetext" href="http://localhost/arqueoserver3/OpenLayers-2.12/OpenLayers.js">http://localhost/arqueoserver3/OpenLayers-2.12/OpenLayers.js</a><br>
Line 467</font></small><br>
<br>
What I'm doing wrong? Probably is something stupid, but i can't see
it. <br>
<br>
Thanks.<br>
<pre class="moz-signature" cols="72">--
Luís Miguel Royo Pérez
</pre>
</body>
</html>