<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-US style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma" vLink=purple link=blue>
<DIV>Yes, managed to get it to work. I have some Java code that pulls a geometry out of a database (SDE) and writes it to a local file system file. Seems OL is fairly fussy about the structure of the GML file. Anyway, here is the OL code:</DIV>
<DIV> </DIV>
<DIV>var fbnd = new OpenLayers.Layer.GML("Farm boundary", "./farmfiles/" + farmid + ".xml", {style: farm_style});<BR> map.addLayer(fbnd);</DIV>
<DIV> </DIV>
<DIV>And here is a sample GML (I experimented with GML structure using one of the OL examples that writes out GML to a text box, then emulated that):</DIV>
<DIV> </DIV>
<DIV><wfs:FeatureCollection xmlns:wfs="<A href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A>"><BR> <gml:featureMember xmlns:gml="<A href="http://www.opengis.net/gml">http://www.opengis.net/gml</A>"><BR> <feature:features xmlns:feature="<A href="http://mapserver.gis.umn.edu/mapserver">http://mapserver.gis.umn.edu/mapserver</A>" fid="OpenLayers.Feature.Vector"><BR> <feature:geometry><BR> <gml:Polygon><BR> <gml:outerBoundaryIs><BR> <gml:LinearRing><BR> <gml:coordinates decimal="." cs=", " ts=" "><BR> 1821412.509, 5534791.015 1821458.847, 5534735.59 1821598.037, 5534849.028 1821614.701, 5534862.607 1821673.566, 5534910.58 1821659.449, 5534927.465 1821655.449, 5534932.249 1821627.218, 5534966.016 1821412.509, 5534791.015<BR> </gml:coordinates><BR> </gml:LinearRing><BR> </gml:outerBoundaryIs><BR> </gml:Polygon><BR> </feature:geometry><BR> </feature:features><BR> </gml:featureMember><BR></wfs:FeatureCollection><BR></DIV>
<DIV>Kind regads,</DIV>
<DIV> </DIV>
<DIV>Robert Sanson</DIV>
<DIV><BR>>>> "Burgholzer,Robert" <rwburgholzer@deq.virginia.gov> 25/04/2008 5:30 a.m. >>><BR></DIV>
<DIV style="COLOR: #000000">
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Has anyone loaded a simple KML/GML layer from a local text file? Maybe this is trivial … </DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks!</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">r.b.</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Robert W. Burgholzer</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Surface Water Modeler</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Office of Water Supply and Planning</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Virginia</DEFANGHTML_SPAN></FONT><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </DEFANGHTML_SPAN></FONT><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Department</DEFANGHTML_SPAN></FONT><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> of Environmental Quality</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><A href="mailto:rwburgholzer@deq.virginia.gov">rwburgholzer@deq.virginia.gov</A></DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">804-698-4405</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Open Source Modeling Tools:</DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><DEFANGHTML_SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><A href="http://sourceforge.net/projects/npsource/">http://sourceforge.net/projects/npsource/</A></DEFANGHTML_SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><DEFANGHTML_SPAN style="FONT-SIZE: 12pt"></DEFANGHTML_SPAN></FONT></P></DIV><BR><BR><FONT style="BACKGROUND-COLOR: #ffffff">
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">Click <A href="https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==">here</A> to report this email as spam.</FONT></P></FONT></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.<br>
------------------------------------------------------------------</td></tr></table><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by SurfControl plc. </FONT><A href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.surfcontrol.com</FONT></A></P>
</body></HTML>