On Wed, 2008-11-05 at 14:35 +0100, Didrik Pinte wrote:
> Hi,
>
> I've updated my layer definition to use OpenLayers.Protocol.HTTP and it
> does not work.
>
> Here is the layer definition :
>
> vector_layer = new OpenLayers.Layer.Vector('Points', {
> styleMap : styleMap,
> strategies : [
> new OpenLayers.Strategy.Cluster()
> ],
> protocol: new OpenLayers.Protocol.HTTP( {
> url : 'stream.json',
> format: new OpenLayers.Format.GeoJSON()
> })
> });
>
> When the map is loaded, Firebug told me there is no feature in the
> vector_layer.
>
> Before using the HTTP procotol, I filled the vector layer using an
> OpenLayer.Request.GET method using the same url and it worked fine.
>
> What am I doing wrong ?Adding a callback and calling the read() method made the layer work but it seems to be exactly the same as when using an OpenLayers.Request.GET in this case. Didrik
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
