<div dir="ltr">A solución a este problema sería <div><img src="cid:ii_1418d77bc4b191b7" alt="Imágenes integradas 1" width="467" height="344"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">El 7 de marzo de 2013 21:29, Pablo Belay Fernández <span dir="ltr"><<a href="mailto:pbelay@gmail.com" target="_blank">pbelay@gmail.com</a>></span> escribió:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Buenas,<div>estoy intentando cargar un mapa en  openlayers con origen de datos un servicio en geojson que proviene de un geoserver. El problema es que no consigo cargar la información..</div>
<div><br></div><div>
El codigo sería:</div><div><br></div><div><div> </div><div><span style="white-space:pre-wrap">                        </span> var protocol_estacions = new OpenLayers.Protocol.WFS({ </div><div><span style="white-space:pre-wrap">                                </span>url: "<a href="http://localhost:8082/geoserver/wfs" target="_blank">http://localhost:8082/geoserver/wfs</a>", </div>

<div><span style="white-space:pre-wrap">                          </span>featureNS: "<a href="http://localhost:8080/xeopesca" target="_blank">http://localhost:8080/xeopesca</a>", </div><div><span style="white-space:pre-wrap">                            </span>featureType: "estacion", </div>

<div><span style="white-space:pre-wrap">                          </span>outputFormat: 'json', </div><div><span style="white-space:pre-wrap">                          </span>readFormat: new OpenLayers.Format.GeoJSON() </div>
<div><span style="white-space:pre-wrap">                  </span>});</div><div><span style="white-space:pre-wrap">                      </span></div><div><span style="white-space:pre-wrap">                 </span>var estacions_json = new OpenLayers.Layer.Vector("Estacións JSON", {</div>

<div><span style="white-space:pre-wrap">                          </span>strategies: [new OpenLayers.Strategy.Fixed()],</div><div><span style="white-space:pre-wrap">                           </span>protocol: protocol_estacions,</div>
<div><span style="white-space:pre-wrap">                          </span>style: {strokeColor: "green", strokeWidth: 5, strokeOpacity: 0.5},</div><div><span style="white-space:pre-wrap">                             </span>projection: new OpenLayers.Projection("EPSG:900913")</div>

<div><span style="white-space:pre-wrap">                  </span>});</div><div><span style="white-space:pre-wrap">                      </span>map.addLayer(estacions_json);</div></div><div><br></div><div><b>Me podeis echar una mano?? Me podeis pasar un ejemplo que funcione?</b></div>

<div><b><br></b></div></div>
</blockquote></div><br></div>