[OpenLayers-Users] Is correct??

Arturo Juárez Lima ajuarez at queretaro.gob.mx
Wed Oct 14 14:21:00 EDT 2009


Hi list,

I have my layers in geoserver and I want show a shape in format WFS, but
I did't make that the map is showing correctly, never showme the shape,
only a map empty.

this ist my code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>1a</title>
</head>
<script
src="http://172.16.23.21:8080/geoserver/openlayers/OpenLayers.js"
type="text/javascript">
        </script>

<body BGCOLOR=#CCCC98 onload="load();">

<div id="map" style="width: 800px; height: 500px; top:-3px; left:-350px;
border: 9px solid #EBE9D4;"></div>
<script type="text/javascript">
function load(map) {
	format = 'image/png';
	var options = {
		//maxExtent: new OpenLayers.Bounds(-100.68433823837833,
19.92869814379752,-98.97019078497003, 21.750688917229123),

                controls:[
			new OpenLayers.Control.Navigation(),
			new OpenLayers.Control.PanZoomBar(),
			new OpenLayers.Control.LayerSwitcher({'ascending':false}),
			new OpenLayers.Control.ScaleLine(),
			new OpenLayers.Control.MousePosition(),
			new OpenLayers.Control.KeyboardDefaults() ],
		numZoomLevels: 31,units: 'm' };
	var map = new OpenLayers.Map("map", options);
	
	layer2 = new OpenLayers.Layer.WFS( 
                "Limites", "http://172.16.23.21:8080/geoserver/wfs?",
                {typename: "geq:LMA", maxfeatures: 50},
                { featureClass: OpenLayers.Feature.WFS});
            map.addLayer(layer2);
		
//map.zoomToMaxExtent();

	map.setCenter(new
OpenLayers.LonLat(-99.854736328125,20.80875529543977), 9); 
}
</script>

</body>
</html>

thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091014/6db2a44f/attachment.html


More information about the Users mailing list