[OpenLayers-Users] Cluster strategy and extract attributes?

Christopher Schmidt crschmidt at metacarta.com
Thu Dec 11 10:40:09 EST 2008


On Thu, Dec 11, 2008 at 03:26:04PM +0000, Joanne Cook wrote:
> Dear All,
> 
> I have implemented a cluster strategy for WFS points on my map, as per
> the example in the documentation. It might just be me, but to get it
> to work at all I had to swap from using OpenLayers.Layer.WFS to
> OpenLayers.Layer.Vector, with a Protocol statement to make up the URL.
> When I tried to add in the "extractAttributes: true" parameter, my
> page didn't display, though it worked fine if I took that statement
> out. However, if I still want to be able to click on a point (when I'm
> down to points representing single sites) and get information, is it
> possible to do that at all? Currently my attributes in the popup just
> show us as "undefined". Was I right to change from Layer.WFS to
> Layer.Vector?

Strategies require the use of Layer.Vector, yes. I don't know where you
added your extractAttributes parameter, but it's most likely that you
need to configure your protocol with a format object ,and in the
creation of that format object, pass the extractAttributes option.

Can you provide code that you have currently, or a link? It is easier to
review a minimal example of the current behavior/problem than it is to
guess how you might be doing things.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list