[OpenLayers-Dev] Layer.WFS StyleMap?

Tim Schaub tschaub at opengeo.org
Tue Jul 27 23:55:50 EDT 2010


On 7/27/10 7:17 PM, christopher.schmidt at Nokia.com wrote:
>
> On Jul 27, 2010, at 7:02 PM, ext Tim Schaub wrote:
>
>> Hey-
>>
>> The OpenLayers.Layer.WFS layer cannot be used with a style map.
>
> Really? Huh. It seems like it should be able to; Tile.WFS calls

Yeah yeah.  You're right.  Deprecated stuff depreciates in my mind.

> layer.addFeatures, which goes directly to the Layer.Vector
> addFeatures, so far as I can tell, and that seems to call
> drawFeature, which uses the StyleMap; the format (at least for
> GML) doesn't seem to set feature.style properties, so I'm
> not sure why StyleMaps wouldn't work?
>
> (Note that whether it does or not is not relevant to whether
> it's the right solution; it's not. But sometimes it is easier
> to use; specifically, it doesn't require you to know the
> geometry name in the backend in order to formulate the request
> correctly, and can be easier to debug...)

You could always submit a patch to have the new GML parsers guess at the 
geometry name :) (honestly, it wouldn't be hard)

>
> -- Chris
>


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.



More information about the Dev mailing list