On Saturday, August 1, 2009, Nicholas Efremov-Kendall <[email protected]> wrote: > 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
Hi. The projection should be set in the layer not in the protocol. Cheers, > -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
