Hello,

 

I am a newbie with geoserver. Just exercising before starting the real work.
J

I use geoserver 2.0.2 on windows XP.

I am trying to build a simple wms using the example layer "sf:roads"
provided in the installationset of geoserver. I tried to run the following
WMS locally, but it did'nt work.

A blank page with My Map opens when i try to open the page with internet
explorer.  

 

I am sure the stylesheet and the openlayers library are correct. I think the
script is also correct?!

Have I forgotten something? Are there some special settings on geoserver
itself?

 

Thank you for helping me out!

 

Sven

 

<html>

<head>

<title>My Map</title>

<link rel="stylesheet"
href="http://localhost:8080/geoserver/openlayers/theme/default/style.css";
type="text/css">

<style>

#map-id {

width: 512px;

height: 256px;

}

</style>

<script
src="http://localhost:8080/geoserver/openlayers/OpenLayers.js";></script>

</head>

<body>

<h1>My Map</h1>

<div id="map-id"></div>

<script>

var map = new OpenLayers.Map("map-id");

var test = new OpenLayers.Layer.WMS(

"road imagery",

"http://localhost:8080/geoserver/wms";,

{layers: "sf:roads"}

);

map.addLayer(test);

map.zoomToMaxExtent();

</script>

</body>

</html>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to