[OpenLayers-Users] Why does this code not work locally?

Jan Martin janmartin at diy-streetview.org
Tue Mar 8 03:56:40 EST 2011


Hi all,
any idea why this code doesn't work locally?

        lgpx = new OpenLayers.Layer.Vector("DIY streetviews", {
        strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1.1})],
        protocol: new OpenLayers.Protocol.HTTP({
              url: "map_data.txt",
            format: new OpenLayers.Format.Text()
        }),
                projection: new OpenLayers.Projection("EPSG:4326")
        });

Whole file:
http://www.diy-streetview.org/data/development/20110217/index.html
and
http://www.diy-streetview.org/data/development/20110217/embed/calls_and_callbacks.js

I added
     // alert("lgpx.features.length: " + lgpx.features.length);
to calls_and_callbacks.js.

On the server I get 167, which is right, but only 0 (zero) on my PC?
Are the features not loaded when running the script locally?

How to fix this?

Thanks,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110308/3b43c917/attachment.html


More information about the Users mailing list