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.
I tried to use this simple vector display code from the tutorial, and it doesn't work in Firefox or IE.
<html>
<head>
<title> A Basic GeoExt Page </title>
<script src="" type="text/_javascript_"></script>
<script src="" type="text/_javascript_"></script>
<script src="" type="text/_javascript_"></script>
<script src="" type="text/_javascript_"></script>
<script type="text/_javascript_">
var vectorLayer = new OpenLayers.Layer.Vector();
for (var i = 0; i < 10; i++){
var x = -180 + Math.random() * 360;
var y = -90 + Math.random() * 180;
var numSides = 3 + Math.round(Math.random() * 6);
vectorLayer.addFeature(
new OpenLayers.Feature.Vector(
OpenLayers.Geometry.Polygon.createRegularPolygon(
new OpenLayers.Geometry.Point(x, y),
numSides)));
}
var map = new OpenLayers.Map();
map.addLayer(vectorLayer);
</script>
</head>
<body>
<div id="gxmap"></div>
</body>
</html>
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?
Any help would be appreciated.
Thanks
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
