[OpenLayers-Users] Layers are not being drawn - proxy issue?

Christopher Schmidt crschmidt at metacarta.com
Thu Mar 19 11:23:31 EDT 2009


On Thu, Mar 19, 2009 at 11:22:09AM -0400, Christopher Schmidt wrote:
> On Thu, Mar 19, 2009 at 09:00:56AM -0400, J. Brian Adams wrote:
> > I am completely new to openlayers (Started Monday!).  I have been  
> > working through some examples but with my own data.  I have a map with  
> > a base layer from openstreetmaps and with a gml layer that I created  
> > with
> > 
> > 			var munis = new OpenLayers.Layer.GML("Municipalities",  
> > "Municipals2006.gml");
> > 			map.addLayer(munis);
> > 
> > It shows up as Municipalities in the menu on the right, but nothing  
> > shows on the map.  The gml file is on the same machine, a mac, and in  
> > the same directory as the html file.  I had read that this might be a  
> > proxy problem, but at that I am lost.
> > 
> > If this is a proxy issue, how do I work around it?
> 
> This is not a proxy problem.
> 
> Do you have Firebug installed? is an xmlhttprequest being made? 

Oh, you're using OpenStreetMap. did you confirm that your data isn't
showing up at 0,0 off the coast of Africa? You should add {'projection':
new OpenLayers.Projection("EPSG:4326")}, as a third arg to your
Layer.GML.

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list