<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY TEXT="#1a1a1a" LINK="#0000ff" BGCOLOR="#ffffff" BACKGROUND="file:///home/ajuarez">
Thanks<BR>
<BR>
I again change the code, and this form, in firebug send me coord to the lines, whit out errors, but in the map don't show me the shape.<BR>
I was change geometryName of 'the_geom' by 'SHAPE', because with 'the_geom' the firebug send me error.<BR>
<BR>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"><BR>
<html xmlns="<A HREF="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</A>"><BR>
<head><BR>
        <title>Prueba 1a</title><BR>
</head><BR>
<script src="http://www.openlayers.org/dev/OpenLayers.js" type="text/javascript"><BR>
</script><BR>
<BR>
<BR>
<body BGCOLOR=#CCCC98 onload="load();"><BR>
<BR>
<div id="map" style="width: 800px; height: 500px; top:-3px; left:-350px; border: 9px solid #EBE9D4;"></div><BR>
<BR>
<script type="text/javascript"><BR>
function load() {<BR>
        format = 'image/png';<BR>
        var options = {<BR>
        <BR>
controls:[<BR>
                        new OpenLayers.Control.Navigation(),<BR>
                        new OpenLayers.Control.PanZoomBar(),<BR>
                        new OpenLayers.Control.LayerSwitcher({'ascending':false}),<BR>
                        new OpenLayers.Control.ScaleLine(),<BR>
                        new OpenLayers.Control.MousePosition(),<BR>
                        new OpenLayers.Control.KeyboardDefaults() ],<BR>
                numZoomLevels: 31,units: 'm' };<BR>
        var map = new OpenLayers.Map("map", options);<BR>
<BR>
        l1 = new OpenLayers.Layer.WMS(<BR>
'Limites', "<A HREF="http://172.16.23.21:8080/geoserver/wms">http://172.16.23.21:8080/geoserver/wms</A>",<BR>
{layers: 'sde:SPF_CATASTRO.LMA',<BR>
srs: 'EPSG:900913',<BR>
                        transparent: true,<BR>
format: format,<BR>
tiled: 'true'<BR>
},{singleTile: true, isBaseLayer: true});<BR>
        l1.setVisibility(true); <BR>
map.addLayer(l1);<BR>
<BR>
        var layer = new OpenLayers.Layer.Vector("WFS", {<BR>
strategies: [new OpenLayers.Strategy.BBOX()],<BR>
protocol: new OpenLayers.Protocol.WFS({<BR>
url: "<A HREF="http://172.16.23.21:8080/geoserver/wfs">http://172.16.23.21:8080/geoserver/wfs</A>",<BR>
featureType: "DTYT.SSC_RUTAS_2009",<BR>
featureNS: "<A HREF="http://172.16.23.21:8080/sde">http://172.16.23.21:8080/sde</A>",<BR>
         geometryName: 'SHAPE',<BR>
version: "1.1.0",<BR>
srsName: "EPSG:4326"<BR>
}) });<BR>
<BR>
/*        var layer2 = new OpenLayers.Layer.WFS( <BR>
'schools', "<A HREF="http://172.16.23.21:8080/geoserver/wfs">http://172.16.23.21:8080/geoserver/wfs</A>",<BR>
{typename: 'TYT:rutas_2009',maxfeatures: 10}, <BR>
{ featureClass: OpenLayers.Feature.WFS}); */<BR>
map.addLayer(layer);<BR>
map.setCenter(new OpenLayers.LonLat(-99.854736328125,20.80875529543977), 9); <BR>
<BR>
}<BR>
</script><BR>
<BR>
</body><BR>
</html><BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Arturo Juárez Lima <<A HREF="mailto:ajuarez@queretaro.gob.mx">ajuarez@queretaro.gob.mx</A>><BR>
GEQ
</TD>
</TR>
</TABLE>
<BR>
<BR>
El jue, 29-10-2009 a las 17:35 +0100, Andreas Hocevar escribió:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Arturo Juárez Lima wrote:
> Thanks Andreas,
>
> I was change the code with your suggestion, and change the url for the
> ip, only my local examples.
But you made one fatal modification of my suggestion:
/
/
> /var layer = new OpenLayers.Layer.Vector("WFS", {/
> / strategies: [new OpenLayers.Strategy.BBOX()],/
> / protocol: new OpenLayers.Protocol.WFS({/
> / url: "<A HREF="http://172.16.23.21:8080/geoserver/wfs,/>">http://172.16.23.21:8080/geoserver/wfs",/</A>
> / featureType: "sde:DTYT.SSC_RUTAS_2009",/
/featureType: "DTYT.SSC_RUTAS_2009",
/
> / featureNS: "<A HREF="http://geoserver.sf.net">http://geoserver.sf.net</A>",/
> / version: "1.1.0",/
> / srsName: "EPSG:4326"/
> / }) });/
Do not use a prefix in featureType -- featureNS takes care of that, by
using the namespace URI, not the prefix.
Regards,
Andreas.
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>