[OpenLayers-Users] Big difficulties with WFS

Andrea Maschio andrea.maschio at gmail.com
Sat Jan 26 10:52:56 EST 2008


Hi everybody, I have got a visualization trouble building a simple wfs  
layer:

FireBug shows this error : OpenLayers.Layer.WFS is not a constructor

here is my code:

function init(){
	
	var map = new OpenLayers.Map('mainMap');
	//write("built map")   ;
	var routingBase = new OpenLayers.Layer.WFS(
                 "routing",
                 "/geoserver/wfs",
                 {typename: 'topp:routing'},
                 {
                     typename: 'routing',
                     featureNS: 'http://www.openplans.org/topp',
                     extractAttributes: false
                 });
         // write("built layer")   ;

  routingBase.style.strokeColor = "#ff0000";
map.addLayers([routingBase]);
//write("added layer")

	}

I have a div with id mainMap. The output ends after building the map,  
and i can see in the page the controls for panning but nothing else.

This is my application path

<tomcat>/myapplication
		/OpenLayers
	/geoserver

I think it is a path problem tied to the ajax architecture, but I  
really can't figure out how to solve it.

Any idea would be really useful.

Thanks


Andrea Maschio
http://www.superandrew.it




More information about the Users mailing list