<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Pessoal será que podiam ajudar-me com as seguintes dúvidas do
openlayeres, as dúvidas são relativas ao exemplo disponivel aqui:<br>
<br>
<a moz-do-not-send="true"
href="http://geobox.geospot.pt/pt/index.php/Edi%C3%A7%C3%A3o_com_OpenLayers">http://geobox.geospot.pt/pt/index.php/Edi%C3%A7%C3%A3o_com_OpenLayers</a><br>
<br>
<br>
<b>1) O que sgnificam estas diferentes partes do código:</b><br>
<pre class="de1"><span class="sc2"><<span class="kw2">link</span> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">"stylesheet"</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">"/openlayers/theme/default/style.css"</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">"text/css"</span> <span class="sy0">/</span>></span></pre>
<pre class="de1"><span class="sc2">
</span><span class="sc2"><pre class="de1">OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
<b>2) Porquê é que aqui a classe map é nula?</b>
<span class="sc2"><pre class="de1"><pre class="de1">var map = null;
<b>3) NO exemplo em questão que segue em baixo, temos de por o schema para o layer do geoserver em questão, trata-se de
um url? Como posso descobrir url para o layer que pretendo? Tentei trocar o nome deste exemplo (participante)
por um layer que tenho e colar no browser mas não abre nada...
POdem dar-me uma dicas?
4)Quando devo utilizar a livraria do openlayers no localhost e quando devo utilizar a online?Tanto faz ou quais as vantagens
de um e de outro?
Obrigado
Bom feriado a todos
</b>
</pre></pre></span>
</pre></span>
</pre>
<br>
<br>
<br>
<br>
<div dir="ltr" class="mw-geshi" style="text-align: left;">
<div class="html4strict source-html4strict">
<pre class="de1"><span class="sc2"><<span class="kw2">html</span> xmlns<span class="sy0">=</span><span class="st0"><a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xhtml">"http://www.w3.org/1999/xhtml"</a></span>></span>
        <span class="sc2"><<span class="kw2">head</span>></span>
                <span class="sc2"><<span class="kw2">title</span>></span>Participantes<span class="sc2"><<span class="sy0">/</span><span class="kw2">title</span>></span>
                <span class="sc2"><<span class="kw2">meta</span> <span class="kw3">http-equiv</span><span class="sy0">=</span><span class="st0">"Content-Type"</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">"text/html; charset=UTF-8"</span> <span class="sy0">/</span>></span>
                <span class="sc2"><<span class="kw2">link</span> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">"stylesheet"</span> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">"/openlayers/theme/default/style.css"</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">"text/css"</span> <span class="sy0">/</span>></span>
                <span class="sc2"><<span class="kw2">script</span> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">"/openlayers/OpenLayers.js"</span>><<span class="sy0">/</span><span class="kw2">script</span>></span>
                <span class="sc2"><<span class="kw2">script</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">"text/javascript"</span>></span>                
                        OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
                        var map = null;
                        function init() {
                                var bounds = new OpenLayers.Bounds(
                                -23941, 208039,
                                -21480, 210148
                                );
                                var options = {
                                        controls: [ new OpenLayers.Control.Navigation(), new OpenLayers.Control.PanZoom(), new OpenLayers.Control.LayerSwitcher()],
                                        maxExtent: bounds,
                                        maxResolution: 9.61328125,
                                        projection: "EPSG:3763",
                                        units: 'm'
                                };
                                map = new OpenLayers.Map('map', options);
                                var wms = new OpenLayers.Layer.WMS(
                                "WMS Participantes", <a class="moz-txt-link-rfc2396E" href="http://localhost:8080/geoserver/wms">"http://localhost:8080/geoserver/wms"</a>, {
                                        layers: 'topp:participante',
                                }, { }
                                );
                                var wfs = new OpenLayers.Layer.Vector("WFS Participantes", {
                                        strategies: [new OpenLayers.Strategy.BBOX()],
                                        protocol: new OpenLayers.Protocol.WFS({
                                                version: "1.1.0",
                                                srsName: "EPSG:3763",
                                                url: <a class="moz-txt-link-rfc2396E" href="http://localhost:8080/geoserver/wfs">"http://localhost:8080/geoserver/wfs"</a>,
                                                featureType: "participante",
                                                featureNS: <a class="moz-txt-link-rfc2396E" href="http://www.openplans.org/topp">"http://www.openplans.org/topp"</a>,
                                                geometryName: "the_geom",
                                                schema: "<a class="moz-txt-link-freetext" href="http://localhost:8080/geoserver/topp/wfs?service=WFS">http://localhost:8080/geoserver/topp/wfs?service=WFS</a><span class="sc1">&version=1.0.0&request=DescribeFeatureType&typeName=topp:participante",</span>
<span class="sc1">                                        })</span>
<span class="sc1">                                });</span>
                                map.addLayers([wms, wfs]);
                                map.zoomToMaxExtent();
                        }
                <span class="sc2"><<span class="sy0">/</span><span class="kw2">script</span>></span>
        <span class="sc2"><<span class="sy0">/</span><span class="kw2">head</span>></span>
        <span class="sc2"><<span class="kw2">body</span> <span class="kw3">onload</span><span class="sy0">=</span><span class="st0">"init()"</span>></span>
                <span class="sc2"><<span class="kw2">h1</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">"title"</span>></span>Participantes<span class="sc2"><<span class="sy0">/</span><span class="kw2">h1</span>></span>
                <span class="sc2"><<span class="kw2">div</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">"map"</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">"smallmap"</span>></span>
                <span class="sc2"><<span class="sy0">/</span><span class="kw2">div</span>></span>
        <span class="sc2"><<span class="sy0">/</span><span class="kw2">body</span>></span>
<span class="sc2"><<span class="sy0">/</span><span class="kw2">html</span>></span></pre>
</div>
</div>
<br>
</body>
</html>