<html><head><base href="x-msg://30/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Make sure you only create your vector layer in the onload handler of <body>.<div><br></div><div>Best regards,</div><div>Bart</div><div><br><div><div><div>On Apr 24, 2010, at 3:06 AM, <a href="mailto:shaun.anderson@verizon.net">shaun.anderson@verizon.net</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>Hi All,<br><br>I am new to GeoExt. I have been trying to use the tutorials and examples, but I can't seem to get past a simple problem.<br><br>I tried to use this simple vector display code from the tutorial, and it doesn't work in Firefox or IE.<br><br><html><br><head><br><title> A Basic GeoExt Page </title><br><script src="ext-3.2.0/adapter/ext/ext-base.js" type="text/javascript"></script><br><script src="ext-3.2.0/ext-all.js" type="text/javascript"></script><br><script src="OpenLayers/OpenLayers.js" type="text/javascript"></script><br><script src="GeoExt/script/GeoExt.js" type="text/javascript"></script><br><script type="text/javascript"><br>var vectorLayer = new OpenLayers.Layer.Vector();<br>for (var i = 0; i < 10; i++){<br> var x = -180 + Math.random() * 360;<br> var y = -90 + Math.random() * 180;<br> var numSides = 3 + Math.round(Math.random() * 6);<br> vectorLayer.addFeature(<br> new OpenLayers.Feature.Vector(<br> OpenLayers.Geometry.Polygon.createRegularPolygon(<br> new OpenLayers.Geometry.Point(x, y),<br> numSides)));<br>}<br>var map = new OpenLayers.Map();<br>map.addLayer(vectorLayer);<br> </script><br></head><br><body><br><div id="gxmap"></div><br></body><br></html><br><br>I've tried some other examples to try and display KML and GML files but they haven't worked. Actually the Sundials example worked when I had the WMS baselayer and the GML, but when I commented out the baselayer, the GML wouldn't show by itself. Can you display a KML/GML file by itself without a WMS baselayer?<br><br>Any help would be appreciated.<br>Thanks<br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@geoext.org">Users@geoext.org</a><br><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br></div></span></blockquote></div><br></div></div></body></html>