[OpenLayers-Users] http protocol problem
Didrik Pinte
lists at dipole-consulting.com
Wed Nov 5 09:15:23 EST 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081105/ffcf205d/attachment.bin
More information about the Users
mailing list