[OpenLayers-Users] PropertyStyles not working with WFS?

Lauri lauri at ruja.ee
Sat Nov 1 18:32:41 EDT 2008


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".

GML layer:
> var layer = new OpenLayers.Layer.GML('GML', '/gml/', { styleMap: styleMap });

Regards,
Lauri



More information about the Users mailing list