[OpenLayers-Users] Map style for WFS layer does not work

Maxime Phaneuf maxime.phaneuf at usherbrooke.ca
Wed Jan 20 14:51:34 EST 2010


        zielona_wfs = new OpenLayers.Layer.WFS(
                "Zielona Gora WFS - drogi, postgis",
                "http://localhost:8080/geoserver/wfs?",
                {typename: 'topp:zielona_openstreets'},
                {
                    typename: 'zielona_openstreets',
                    featureNS: 'http://www.openplans.org/topp',
                   // style: my_style,
                   styleMap: my_style
                    extractAttributes: true
                }
        ); 

I also declare my WFS layer this way:

		polygonHawaii = new OpenLayers.Layer.Vector("Hawaii Polygons", {
			strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
			styleMap: polygonStyle,
			protocol: new OpenLayers.Protocol.WFS({
				version:       "1.0.0",
				url:           "http://***:8080/geoserver/wfs?",
				featureType:   "polygon_hawaii",
				srsName:       "EPSG:900913",
				featurePrefix: "topp",
				geometryName:  "the_geom"
			})
		});

Hope this helps you.

Maxime	
-- 
View this message in context: http://n2.nabble.com/Map-style-for-WFS-layer-does-not-work-tp4426355p4428985.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list