[OpenLayers-Users] Problem with Layer.vector

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Mon Aug 3 13:13:50 EDT 2009


Hi all,
I've been trying to implement my gml as a layer.vector, as opposed to a
layer.gml. I'm loading both into the browser with the different methods, and
I can from firebug that the file is getting loaded, but it's not being
displayed. Thus, if I re-sent my auto-center to sites2.events, it doesn't
center at all. I'm not sure what going wrong here, I thought I'd followed
the examples pretty closely. Thanks (again) in advance.
//loads fine
 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,
  }
  );
  map.addLayer(sites);

 // loads into browser but not displayed.
  var sites2 = new OpenLayers.Layer.Vector (
  "sites2", {projection: map.displayProjection, strategies: [new
OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({url:
"data/siteswatr.gml", format: [new OpenLayers.Format.GML()]})});
  map.addLayer(sites2);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090803/955b5127/attachment.html


More information about the Users mailing list