On Sun, Nov 02, 2008 at 12:32:41AM +0200, Lauri wrote:
> Hello,
> 
> I have a strange problem: PropertyStyles works with GML layers, but not
> with WFS - same GML code, same config.
> 
> > var symbolizer = OpenLayers.Util.applyDefaults(
> >         {externalGraphic: "img/${icon}", pointRadius: 20},
> >         OpenLayers.Feature.Vector.style["default"]);
> > var styleMap = new OpenLayers.StyleMap({default: symbolizer, select: 
> > {pointRadius: 30}});
> 
> WFS layer:
> > var layer = new OpenLayers.Layer.WFS('WFS', '/gml/', {}, { styleMap: 
> > styleMap });
> ...and browser requests "img/undefined".

WFS doesn't extract attibutes by default (because it's expensive): set
extractAttributes: true in the WFS options. 

> GML layer:
> > var layer = new OpenLayers.Layer.GML('GML', '/gml/', { styleMap: styleMap 
> > });
> 
> Regards,
> Lauri
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to