[OpenLayers-Users] data displays in wrong position, after switch to Layer.Vector

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Sat Aug 1 12:27:40 EDT 2009


Hi all,
I tried switching my application over from Layer.GML to Layer.Vector.

here's the original code which displayed in the correct place:

var sites = new OpenLayers.Layer.GML (
"Archaeological Sites", "data/siteswatr.gml",
{
style: {pointRadius: 2.5},
projection: new OpenLayers.Projection("EPSG:4326"),
format: OpenLayers.Format.GML,
}
);
Here's the modified code which displays in the S. Atlantic ocean.

var sites = new OpenLayers.Layer.Vector (
"Archaeological Sites", {
                    strategies: [new OpenLayers.Strategy.Fixed()],
                    protocol: new OpenLayers.Protocol.HTTP({
                        url: "data/siteswatr.gml",
style: {pointRadius: 2.5},
projection: new OpenLayers.Projection("EPSG:4326"),
                        format: new OpenLayers.Format.GML(),
})
                });
map.addLayer(sites);

I'm sure I messed something up, but what did I do wrong?
thanks,
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090801/90693006/attachment.html


More information about the Users mailing list