I fixed the problem. The first was as you mentioned that I am using Openstreetmaps and I had failed to add the projection to the layer. Adding the line
{ projection: new OpenLayers.Projection("EPSG:4326") } fixed the problem that I had with a KML point file. But the GML layer then disappeared completely. I had created the GML file from a GRASS vector file in a state plane coordinate system. That appears to have been the problem. I re-exported the file from GRASS vector to GML but this time in a vector that was already in a Lat - Long format. It now loads and displays correctly. Thanks for your help. Brian On Mar 19, 2009, at 11:22 AM, 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? >> >> Regards, >> -- >> Christopher Schmidt >> MetaCarta > > 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 _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users