<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    experimentei nesta parte do html:<br>
    <br>
    &lt;body onload='init();'&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;h1&gt;Vizela&lt;/h1&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;div id='map' style='width: 1200px; height: 800px;'&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>
    <br>
    <br>
    Mudar a largura e altura para 100% mas n&atilde;o funciona, tem de ser
    noutra parte?<br>
    <br>
    <br>
    Obrigado<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    On 04-12-2011 14:22, Marco Afonso wrote:
    <blockquote
cite="mid:CAG6YeNyECBgB4KM_mAudG8ym4UdTajhebXu=Qm-SXAjfWv-SfA@mail.gmail.com"
      type="cite">Viva Pedro,<br>
      <br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> Como fixar o zoom com
            base numa unica layer de modo a que n&atilde;o seja possivel mover
            o mapa para al&eacute;m desse mesmo layer?Mesmo que exista outros
            com &aacute;reas superiores.<br>
            <br>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>Existem alguns m&eacute;todos para obter o Extent dos dados da
          layer em quest&atilde;o, veja em:</div>
        <div><a moz-do-not-send="true"
href="http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.getExtent">http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.getExtent</a></div>
        <div><br>
        </div>
        <div>No caso dos WMS, os "dados" devolvidos s&atilde;o apenas imagens,
          e pode centrar o mapa com recurso a map.setCenter()</div>
        <div><a moz-do-not-send="true"
href="http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.setCenter">http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.setCenter</a></div>
        <div><br>
        </div>
        <div>&nbsp;</div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            Adicionando layer como wms/png &eacute; poss&iacute;vel depois editar
            (como vectores) e adicionar eventos com base em mouse
            events?<br>
            <br>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>O servi&ccedil;o WMS apenas devolve imagens, n&atilde;o devolve dados
          vectoriais. &Eacute; possivel adicionar eventos ao mapa. Procure nos
          exemplos por events.</div>
        <div><a moz-do-not-send="true"
            href="http://openlayers.org/dev/examples/">http://openlayers.org/dev/examples/</a></div>
        <div><br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            Devido a ter muitas camadas parte do layer switcher fica
            oculto como posso resolver este problema sem ter de aumentar
            ao tamanho da pagina?&eacute; possivel fixar-lo no canto superior
            esquerdo?(mais para cima) e colocar o tamanho das letras
            mais pequeno?<br>
            <br>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>Existem v&aacute;rias formas de custumizar o Layer Switcher. Uma
          delas &eacute; alterar o respectivo CSS; pode ainda criar o seu
          pr&oacute;prio Layer Switcher.</div>
        <div>Por exemplo com a framework GeoExt pode criar uma &aacute;rvore de
          camadas.&nbsp;<a moz-do-not-send="true"
            href="http://api.geoext.org/1.0/examples/tree.html">http://api.geoext.org/1.0/examples/tree.html</a></div>
        <div>Ou simplesmente pode esconder algumas das suas layers
          utilizando a op&ccedil;&atilde;o <b>displayInLayerSwitcher: false;</b></div>
        <div><br>
        </div>
        <div>&nbsp;</div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            Como posso ajustar automaticamente o tamanho da janela do
            openlayers ao tamanho da pagina?<br>
            <br>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>Basicamente &eacute; definir no CSS a largura e altura da div #map
          para 100%.</div>
        <div><a moz-do-not-send="true"
            href="http://openlayers.org/dev/examples/fullScreen.html">http://openlayers.org/dev/examples/fullScreen.html</a></div>
        <div>&nbsp;</div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex;">
          <div bgcolor="#FFFFFF" text="#000000"> <br>
            <br>
            Obrigado
            <div>
              <div class="h5"><br>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>
                On 02-12-2011 17:21, Jorge de Jesus wrote:
                <blockquote type="cite"> Oi<br>
                  <br>
                  Normalmente uso o Google Earth, a unica chatice eh que
                  tens de ter o WMS com suporte para o sistema
                  EPSG:900913 (Spherical Mercator), ou entao tens de
                  usar OpenLayer.Layer.TMS que funciona como uma proxy
                  para o WMS<br>
                  <br>
                  Se queres um exemplo ve este site:<br>
                  <a moz-do-not-send="true"
                    href="http://rsg.pml.ac.uk/wps/example/index.html"
                    target="_blank">http://rsg.pml.ac.uk/wps/example/index.html</a><br>
                  <br>
                  Da uma vista de olhos&nbsp; ao codigo que podes descarregar
                  num ficheiro comprimido<br>
                  <br>
                  Bom fim de semana, eu vou beber umas pints<br>
                  <br>
                  Jorge<br>
                  <br>
                  <br>
                  On 02/12/11 17:15, Pedro Costa wrote:
                  <blockquote type="cite"> Pois n&atilde;o tem muita l&oacute;gica,
                    estou s&oacute; a testar a ver se aprendo alguma coisa :-).<br>
                    <br>
                    Qual camada &eacute; que costumas usar como base layer?
                    Tenho de encontrar uma simples...<br>
                    <br>
                    Obrigado, vou seguir as dicas<br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    On 02-12-2011 15:31, Jorge de Jesus wrote:
                    <blockquote type="cite"> <br>
                      Oi<br>
                      <br>
                      Um conselho, tenta usar o pastbin (<a
                        moz-do-not-send="true"
                        href="http://pastebin.com/" target="_blank">http://pastebin.com/</a>)
                      assim mandas so um link em vez de uma catrafada de
                      javascript<br>
                      <br>
                      O que se passa em e' que ao selectionares a camada
                      OSM ela fica sobreposta a camada wms_ruas e deixas
                      de ver, o que e' logico :)<br>
                      <br>
                      Talvez a solucao seja adicional as propriedades da
                      camada OSM algum valor de transparencia
                      ('opacity': 0.5)<br>
                      <br>
                      Mas uma pergunta, pelo que vejo tens uma baseLayer
                      que bem de um WMS + uma camada com Ruas, nao
                      consiguo percebe a utilidade da OSM.<br>
                      <br>
                      Nao basta usar a OSM como baseLayer + WMS_ruas ?<br>
                      <br>
                      Normalmente o uso mais comum do OpenLayers e'
                      teres uma image raster e depois em cima varias
                      camadas vectoriais, ja que nas camadas vectoriais
                      e' mais facil de modificar as transparencias de
                      cada objecto<br>
                      <br>
                      Alguem tem mais ideas, sugestoes ?<br>
                      Jorge<br>
                      <br>
                      On 02/12/11 15:20, Pedro Costa wrote:
                      <blockquote type="cite"> Tentei assim:<br>
                        <br>
                        <br>
                        &lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>
                        &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0
                        Strict//EN" "DTD/xhtml1-strict.dtd"&gt;<br>
                        &lt;html xmlns=<a moz-do-not-send="true"
                          href="http://www.w3.org/1999/xhtml"
                          target="_blank">"http://www.w3.org/1999/xhtml"</a>&gt;<br>
                        &nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;O meu primeiro
                        mapa&lt;/title&gt;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta http-equiv="Content-Type"
                        content="text/html; charset=UTF-8" /&gt;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script src=<a moz-do-not-send="true"
                          href="http://openlayers.org/api/OpenLayers.js"
                          target="_blank">"http://openlayers.org/api/OpenLayers.js"</a>&gt;&lt;/script&gt;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script type="text/javascript"&gt;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var map;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; function init() {<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var bounds = new
                        OpenLayers.Bounds(<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -15699, 188532, -13689, 190828);<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var options = {<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; controls: [ new
                        OpenLayers.Control.Navigation(),<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new
                        OpenLayers.Control.PanZoom(),<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new
                        OpenLayers.Control.LayerSwitcher()],<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxExtent: bounds,<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxResolution: <a
                          moz-do-not-send="true" href="tel:9.61328125"
                          value="+351961328125" target="_blank">9.61328125</a>,<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; projection: "EPSG:27492",<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; units: 'm'<br>
                        <br>
                        };<br>
                        <br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map = new OpenLayers.Map('map',
                        options);<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var wms_ruas = new
                        OpenLayers.Layer.WMS(<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "ruas",<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a moz-do-not-send="true"
                          href="http://localhost:8080/geoserver/wms"
                          target="_blank">"http://localhost:8080/geoserver/wms"</a>,<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'layers': 'Vizela:ruas',
                        'format':'image/png',<br>
                        'transparent':'true',strategies:[new
                        OpenLayers.Strategy.Fixed()]},<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'opacity': 1.0, 'isBaseLayer':
                        false, 'visibility': true}<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>
                        <br>
                        <br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
                        &nbsp;&nbsp;&nbsp; var wms_base = new OpenLayers.Layer.WMS(<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "base",<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a moz-do-not-send="true"
                          href="http://localhost:8080/geoserver/wms"
                          target="_blank">"http://localhost:8080/geoserver/wms"</a>,<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'layers': 'Vizela:base',
                        'format':'image/png',<br>
                        'transparent':'true',strategies:[new
                        OpenLayers.Strategy.Fixed()]},<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'opacity': 1.0, 'isBaseLayer': true,
                        'visibility': true}<br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>
                        <br>
                        var osm_layer = new OpenLayers.Layer.OSM(<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'OpenStreetMap Layer'<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; );<br>
                        <br>
                        &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                        map.addLayers([wms_base,osm_layer,wms_ruas]);<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(!map.getCenter()) {<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.zoomToMaxExtent();<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/script&gt;<br>
                        &nbsp;&nbsp;&nbsp; &lt;/head&gt;<br>
                        &nbsp;&nbsp;&nbsp; &lt;body onload='init();'&gt;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;h1&gt;Mapa mundo&lt;/h1&gt;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;div id='map' style='width: 500px;
                        height: 500px;'&gt;<br>
                        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>
                        &nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
                        &lt;/html&gt;<br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        E funciona no entanto quando seleciono a camada
                        OSM deixo de conseguir ver as ruas...Existe
                        alguma propriedade para mudar isto?Tenho de
                        colocar o layer osm transparente?<br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        On 02-12-2011 14:33, Jorge de Jesus wrote:
                        <blockquote type="cite"> Vou responder a este
                          email e ao outro que mandaste<br>
                          <br>
                          Nunca trabalhei com OSM, acho que e' uma
                          classe que e' herdada de OpenLayers.Layer.XYZ
                          portanto tera as mesmos options.<br>
                          <a moz-do-not-send="true"
                            href="http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example"
                            target="_blank">http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example</a><br>
                          <br>
                          Podes meter a layer onde quiseres sem grandes
                          problemas, ate podes chegar a este ponto:<br>
                          <br>
                          map.addLayer(new OpenLayers.Layer.OSM());<br>
                          <br>
                          Eu nao sei o que estas a tentar fazer mas
                          penso que queras que OSM seja a baseLayer ?
                          Talvez isto funcione ?<br>
                          <br>
                          map.addLayer(new
                          OpenLayers.Layer.OSM(options={'isBaseLayer':true}));<br>
                          <br>
                          Quanto ao erro:<br>
                          <br>
                          <br>
                          <div><span></span><span>layer.div is undefined</span></div>
                          <span></span>
                          <div><a moz-do-not-send="true"
title="layer.div.className=&quot;olLayerDiv&quot;;layer.div.style.overflow=&quot;&quot;;this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);}">layer.div.className="olLayerDiv";layer...ContainerDiv.appendChild(layer.div);}<br>
                              <br>
                              o problema esta aqui:<br>
                              <br>
                              map.<b>addLayer</b>([wms_ruas, wms_base]);<br>
                              <br>
                              addLayer --&gt; Adiciona 1 layer e a
                              funcao aceita um Layer Object <br>
                              <br>
                              No teu caso estas a mandar uma lista de
                              layers <br>
                              <br>
                              Tens de usar o metodo addLayers que aceita
                              uma array com layer<br>
                              <br>
                            </a><a moz-do-not-send="true"
title="layer.div.className=&quot;olLayerDiv&quot;;layer.div.style.overflow=&quot;&quot;;this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);}">map.<b>addLayers</b>([wms_ruas,





                              wms_base]);</a><a moz-do-not-send="true"
title="layer.div.className=&quot;olLayerDiv&quot;;layer.div.style.overflow=&quot;&quot;;this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);}"><br>
                            </a></div>
                          <br>
                          Agora tudo ao molho (e fe' em Deus) !!!<br>
                          <br>
                          <a moz-do-not-send="true"
title="layer.div.className=&quot;olLayerDiv&quot;;layer.div.style.overflow=&quot;&quot;;this.setLayerZIndex(layer,this.layers.length);if(layer.isFixed){this.viewPortDiv.appendChild(layer.div);}else{this.layerContainerDiv.appendChild(layer.div);}">map.<b>addLayers</b>([wms_ruas,




                            wms_base,new OpenLayers.Layer.OSM() ]);</a><br>
                          <br>
                          <br>
                          E tudo por agora mais duvida ?! ^_^ <br>
                          <br>
                          Eu normalmente estou no free.node.irc no canal
                          #pywps<br>
                          <br>
                          Jorge<br>
                          <br>
                          <br>
                          On 02/12/11 12:51, Pedro Costa wrote:
                          <blockquote type="cite"> Jorge ajuda-me tamb&eacute;m
                            no seguinte sff, estou a tentar agora
                            adicionar um layer osm no c&oacute;digo em baixo:<br>
                            <br>
                            <br>
                            &lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>
                            &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML
                            1.0 Strict//EN" "DTD/xhtml1-strict.dtd"&gt;<br>
                            &lt;html xmlns=<a moz-do-not-send="true"
                              href="http://www.w3.org/1999/xhtml"
                              target="_blank">"http://www.w3.org/1999/xhtml"</a>&gt;<br>
                            &nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;O meu primeiro
                            mapa&lt;/title&gt;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta http-equiv="Content-Type"
                            content="text/html; charset=UTF-8" /&gt;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script src=<a
                              moz-do-not-send="true"
                              href="http://openlayers.org/api/OpenLayers.js"
                              target="_blank">"http://openlayers.org/api/OpenLayers.js"</a>&gt;&lt;/script&gt;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script
                            type="text/javascript"&gt;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var map;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; function init() {<br>
                            <br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var bounds = new
                            OpenLayers.Bounds(<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -15699, 188532, -13689,
                            190828);<br>
                            <br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var options = {<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; controls: [ new
                            OpenLayers.Control.Navigation(),<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new
                            OpenLayers.Control.PanZoom(),<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new
                            OpenLayers.Control.LayerSwitcher()],<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxExtent: bounds,<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxResolution: <a
                              moz-do-not-send="true"
                              href="tel:9.61328125"
                              value="+351961328125" target="_blank">9.61328125</a>,<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; projection:
                            "EPSG:27492",<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; units: 'm'<br>
                            <br>
                            };<br>
                            <br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map = new
                            OpenLayers.Map('map', options);<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var wms_ruas = new
                            OpenLayers.Layer.WMS(<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "ruas",<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a moz-do-not-send="true"
                              href="http://localhost:8080/geoserver/wms"
                              target="_blank">"http://localhost:8080/geoserver/wms"</a>,<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'layers': 'Vizela:ruas',
                            'format':'image/png',<br>
                            'transparent':'true',strategies:[new
                            OpenLayers.Strategy.Fixed()]},<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'opacity': 1.0, 'isBaseLayer':
                            true, 'visibility': true}<br>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>
                            <br>
                            &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(wms_ruas);<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(!map.getCenter()) {<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.zoomToMaxExtent();<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/script&gt;<br>
                            &nbsp;&nbsp;&nbsp; &lt;/head&gt;<br>
                            &nbsp;&nbsp;&nbsp; &lt;body onload='init();'&gt;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;h1&gt;Mapa mundo&lt;/h1&gt;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;div id='map' style='width:
                            500px; height: 500px;'&gt;<br>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>
                            &nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
                            &lt;/html&gt;<br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            Mas sinceramente n&atilde;o sei bem onde o inserir,
                            j&aacute; tentei em v&aacute;rios locais e n&atilde;o
                            funciona.POdes ajudar?<br>
                            Estava a tentar adicionando o seguinte:<br>
                            <br>
                            <pre>var osm_layer = new OpenLayers.Layer.OSM(
                                'OpenStreetMap Layer'
                                );


Abra&ccedil;o
</pre>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            On 02-12-2011 12:37, Jorge de Jesus wrote:
                            <blockquote type="cite"> Ok parece que o
                              assunto esta resolvido<br>
                              <br>
                              On 02/12/11 11:42, Pedro Costa wrote:
                              <blockquote type="cite"> Consegui
                                resolver...Tinha de mudar postgis para o
                                nome da store que tinha e j&aacute; funciona:-)<br>
                                <br>
                                Obrigado pessoal<br>
                                Vou continuar o estudo <br>
                                <br>
                                ABra&ccedil;o<br>
                                <br>
                                <br>
                                <br>
                                -------- Original Message --------
                                <table border="0" cellpadding="0"
                                  cellspacing="0">
                                  <tbody>
                                    <tr>
                                      <th align="RIGHT" nowrap="nowrap"
                                        valign="BASELINE">Subject: </th>
                                      <td>Re: [Portugal] duvidas sobre
                                        openlayers</td>
                                    </tr>
                                    <tr>
                                      <th align="RIGHT" nowrap="nowrap"
                                        valign="BASELINE">Date: </th>
                                      <td>Fri, 02 Dec 2011 11:26:55
                                        +0000</td>
                                    </tr>
                                    <tr>
                                      <th align="RIGHT" nowrap="nowrap"
                                        valign="BASELINE">From: </th>
                                      <td>Pedro Costa <a
                                          moz-do-not-send="true"
                                          href="mailto:pedrocostaarma@sapo.pt"
                                          target="_blank">&lt;pedrocostaarma@sapo.pt&gt;</a></td>
                                    </tr>
                                    <tr>
                                      <th align="RIGHT" nowrap="nowrap"
                                        valign="BASELINE">To: </th>
                                      <td>Jorge de Jesus <a
                                          moz-do-not-send="true"
                                          href="mailto:jmdj@pml.ac.uk"
                                          target="_blank">&lt;jmdj@pml.ac.uk&gt;</a></td>
                                    </tr>
                                  </tbody>
                                </table>
                                <br>
                                <br>
                                <br>
                                Obrigado Jorge. J&aacute; eliminei os erros no
                                entanto o openlayers n&atilde;o est&aacute; a carregar
                                o layer ruas, a p&aacute;gina abre mas sem eu
                                conseguir ver o layer.<br>
                                <br>
                                Tentei wms_ruas.getExtent() no firebug e
                                obtenho o seguinte erro: <span><span>ReferenceError:


                                    wms_ruas is not defined.<br>
                                    Penso que n&atilde;o est&aacute; a conseguir ir
                                    buscar o layer ao geoserver, alguma
                                    segest&atilde;o do que poder&aacute; ser?<br>
                                    <br>
                                    <br>
                                    Obrigado pelas repostas de todos<br>
                                  </span></span><br>
                                <br>
                                <br>
                                <br>
                                <br>
                                <br>
                                <br>
                                <br>
                                On 02-12-2011 09:32, Jorge de Jesus
                                wrote:
                                <blockquote type="cite"> On 02/12/11
                                  00:37, Pedro Costa wrote:
                                  <blockquote type="cite"> Pessoal podem
                                    ajudar-me tamb&eacute;m nas seguintes
                                    d&uacute;vidas:<br>
                                    <br>
                                    <br>
                                    Eu tenho o html que segue em baixo,
                                    quando o abro, o firebug indica um
                                    erro assim:<br>
                                    <br>
                                    <div><span>OpenLayers is not defined</span></div>
                                    <span></span>
                                    <div><a moz-do-not-send="true"
                                        title="var bounds = new
                                        OpenLayers.Bounds(">&nbsp;var bounds
                                        = new OpenLayers.Bounds(<br>
                                        <br>
                                        <br>
                                      </a></div>
                                  </blockquote>
                                  "OpenLayers is not defined" acho que
                                  este e' o error que tens, parece que a
                                  pagina nao carregou o OpenLayers.js.
                                  Ve&nbsp; no tab "Net"&gt;js&nbsp; do firefox se
                                  ele carregou o OpenLayers, experimenta
                                  usar a versao online: <br>
                                  <br>
                                  <br>
                                  &lt;script type="text/javascript" src=<a
                                    moz-do-not-send="true"
                                    href="http://openlayers.org/dev/OpenLayers.js"
                                    target="_blank">"http://openlayers.org/dev/OpenLayers.js"</a>&gt;&lt;/script&gt;<br>
                                  <br>
                                  <br>
                                  Eu experimentei: var bounds = new
                                  OpenLayers.Bounds(-23941,
                                  208039,-21480, 210148);<br>
                                  <br>
                                  E esta tudo OK<br>
                                  <br>
                                  Quanto aos bounds, experimenta meter
                                  os bounds iguais aos descritos no WMS
                                  (faz um pedido getCapabilites), depois
                                  de teres adicionado o a layer
                                  wms_ruas, podes usar
                                  wms_ruas.getExtent():<br>
                                  <br>
map.zoomToExtent(wms_ruas.getExtent());<br>
                                  <br>
                                  So uma chamada de atencao o object
                                  wms_ruas so esta totalmante
                                  operacional depois de adicionado ao
                                  mapa e depois de feito o pedido ao
                                  servico pelo openlayers, ate teres o
                                  objecto totalmente criado certas
                                  variaveis e metodos dao error.<br>
                                  <br>
                                  Jorge<br>
                                  <br>
                                  <blockquote type="cite">
                                    <div><a moz-do-not-send="true"
                                        title="var bounds = new
                                        OpenLayers.Bounds("> Penso que
                                        seja porque os bounds est&atilde;o mal
                                        definidos. A minha d&uacute;vida &eacute; o
                                        seguinte, como posso saber os
                                        bounds correctos? E em que src
                                        tenho de os escrever?Igual ao
                                        src do layer que quero ir
                                        buscar?Ser&aacute; que funciona se eu
                                        executar no firebug
                                        map.zoomToMaxExtent e
                                        map.getExtent no layer preview
                                        do geoserver?<br>
                                        <br>
                                        Tentei isso e d&aacute;-me os valores:
                                        topp right left e bottom, mas
                                        porque ordem os escrevo?<br>
                                        <br>
                                        <br>
                                        Podem tirar-me estas d&uacute;vidas?<br>
                                        <br>
                                        Obrigado<br>
                                      </a></div>
                                    <br>
                                    <br>
                                    <br>
                                    &lt;?xml version="1.0"
                                    encoding="UTF-8"?&gt;<br>
                                    &lt;!DOCTYPE HTML PUBLIC
                                    "-//W3C//DTD XHTML 1.0 Strict//EN"
                                    "DTD/xhtml1-strict.dtd"&gt;<br>
                                    &lt;html xmlns=<a
                                      moz-do-not-send="true"
                                      href="http://www.w3.org/1999/xhtml"
                                      target="_blank">"http://www.w3.org/1999/xhtml"</a>&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;O meu primeiro
                                    mapa&lt;/title&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta
                                    http-equiv="Content-Type"
                                    content="text/html; charset=UTF-8"
                                    /&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script
                                    src="/openlayers/lib/OpenLayers.js"
type="text/javascript"&gt;&lt;/script&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script
                                    type="text/javascript"&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var map;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; function init() {<br>
                                    <br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var bounds = new
                                    OpenLayers.Bounds(<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -23941, 208039,<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -21480, 210148<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; );<br>
                                    <br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var options = {<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; controls: [ new
                                    OpenLayers.Control.Navigation(),<br>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    new OpenLayers.Control.PanZoom(),<br>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    new
                                    OpenLayers.Control.LayerSwitcher()],<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxExtent:
                                    bounds,<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxResolution: <a
                                      moz-do-not-send="true"
                                      href="tel:9.61328125"
                                      value="+351961328125"
                                      target="_blank">9.61328125</a>,<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; projection:
                                    "EPSG:27492",<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; units: 'm'<br>
                                    <br>
                                    };<br>
                                    <br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map = new
                                    OpenLayers.Map('map', options);<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var wms = new
                                    OpenLayers.Layer.WMS(<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'OpenLayers WMS',<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; '<a
                                      moz-do-not-send="true"
                                      href="http://localhost:8080/geoserver/wms"
                                      target="_blank">http://localhost:8080/geoserver/wms</a>',











                                    {<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers:
                                    'topp:ruas'<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }, {} );<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.addLayer(wms);<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(!map.getCenter())
                                    {<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                                    map.zoomToMaxExtent();<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/script&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &lt;/head&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &lt;body onload='init();'&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;h1&gt;Mapa
                                    mundo&lt;/h1&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;div id='map'
                                    style='width: 500px; height:
                                    500px;'&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>
                                    &nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>
                                    &lt;/html&gt;<br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    <br>
                                    On 01-12-2011 13:22, Jorge de Jesus
                                    wrote:
                                    <blockquote type="cite"> Algumas
                                      respostas peco desculpas pelo
                                      email meio algarviado<br>
                                      <br>
                                      <br>
                                      On 01/12/11 12:41, Pedro Costa
                                      wrote:
                                      <blockquote type="cite"> Pessoal
                                        ser&aacute; que podiam ajudar-me com as
                                        seguintes d&uacute;vidas do
                                        openlayeres, as d&uacute;vidas s&atilde;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"
                                          target="_blank">http://geobox.geospot.pt/pt/index.php/Edi%C3%A7%C3%A3o_com_OpenLayers</a><br>
                                        <br>
                                        <br>
                                        <b>1)&nbsp; O que sgnificam estas
                                          diferentes partes do c&oacute;digo:</b><br>
                                        <pre><span>&lt;<span>link</span> <span>rel</span><span>=</span><span>"stylesheet"</span> <span>href</span><span>=</span><span>"/openlayers/theme/default/style.css"</span> <span>type</span><span>=</span><span>"text/css"</span> <span>/</span>&gt;</span></pre>
                                        <pre><span>
</span></pre>
                                      </blockquote>
                                      Isto e' un link pro CSS (cascade
                                      style sheet) que define como&nbsp;
                                      varios elementos vao ser
                                      rendizados (rendered), ou seja
                                      cores, tipos de letras icons, e
                                      onde os menus (exemplo:
                                      LayerSwitcher) vao aparecer etc.
                                      Da uma vista de olhos ao ficheiro
                                      e experimenta a fazer alteracoes
                                      :) .Se nao sabes trabalhar com CSS
                                      da uma vista de olhos a: <a
                                        moz-do-not-send="true"
                                        href="http://www.w3schools.com/css/"
                                        target="_blank">http://www.w3schools.com/css/</a><br>
                                      <blockquote type="cite">
                                        <pre><span></span><span><pre>OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";

</pre></span></pre>
                                      </blockquote>
                                      Aiiiiiii a santa bendita proxy !!!
                                      Da uma vista de olhos aqui: <a
                                        moz-do-not-send="true"
href="http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost"
                                        target="_blank">http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost</a>
                                      <br>
                                      <br>
                                      Basicamente em Javascript tu nao
                                      podes chamar um URL que nao esteja
                                      no mesmo dominio, por exemplo se o
                                      teu site esta em <a
                                        moz-do-not-send="true"
                                        href="http://localhost"
                                        target="_blank">http://localhost</a>
                                      mas o WFS esta em <a
                                        moz-do-not-send="true"
                                        href="http://WFSsite.pt"
                                        target="_blank">http://WFSsite.pt</a>
                                      o codigo de javascipript nao pode
                                      aceder a <a
                                        moz-do-not-send="true"
                                        href="http://WFSsite.pt"
                                        target="_blank">http://WFSsite.pt</a>,
                                      esta situacao eh conhecida por
                                      "cross domain" da uma vista de
                                      olhos na internet<br>
                                      &nbsp;<br>
                                      Actualmente os browsers mais
                                      recentes podem contactar outros
                                      dominios se o servidor no outro
                                      dominio suportar a norma CORS: <a
                                        moz-do-not-send="true"
href="http://www.leggetter.co.uk/2010/03/12/making-cross-domain-javascript-requests-using-xmlhttprequest-or-xdomainrequest.html"
                                        target="_blank">http://www.leggetter.co.uk/2010/03/12/making-cross-domain-javascript-requests-using-xmlhttprequest-or-xdomainrequest.html</a><br>
                                      <br>
                                      Basicamente, a melhor estrategia
                                      eh de instalar a proxy no teu
                                      servidor e deixar que o openlayers
                                      trate do assunto.<br>
                                      <br>
                                      Normalmente, o firebug manda-te um
                                      erro quando tens cross-domain
                                      (normalmente o browser nao diz
                                      nada e nao faz nada quando tens
                                      cross-domain)<br>
                                      <blockquote type="cite">
                                        <pre><span><pre><b>2) Porqu&ecirc; &eacute; que aqui a classe map &eacute; nula?</b>

</pre></span></pre>
                                      </blockquote>
                                      <br>
                                      var map=null; Bem uns gostam
                                      cozido outros gosta de assado :0&nbsp;
                                      eh so um estilo de programacao, se
                                      usares var map; vai dar ao mesmo.
                                      Uma chamada de atencao, o var
                                      map=null; esta fora da funcao
                                      init(), quer dizer que eh uma
                                      variable global, que pode ser
                                      acedida por qualquer funcao.
                                      Normalmente um erro comum e' meter
                                      "var map" dentro do init()<br>
                                      <br>
                                      Pessoalmente meto o map e as
                                      layers sempre fora da funcao de
                                      inicializacao, ja que variaveis
                                      globais parecem logo no firebug.<br>
                                      <br>
                                      <br>
                                      <blockquote type="cite">
                                        <pre><span><pre><span><pre><pre>var map = null;

<b>3) NO exemplo em quest&atilde;o que segue em baixo, temos de por o schema para o layer do geoserver em quest&atilde;o, trata-se de
&nbsp;um url? Como posso descobrir url para o layer que pretendo? Tentei trocar o nome deste exemplo (participante)
&nbsp;por um layer que tenho e colar no browser mas n&atilde;o abre nada...
POdem dar-me uma dicas?

</b></pre></pre></span></pre></span></pre>
                                      </blockquote>
                                      <br>
                                      Eu raramente trabalho com WFS e
                                      estive a ver no codigo do
                                      openlayers (Protocol/WFS/v1.js)
                                      temos a seguinte definicao da
                                      propriedade schema:<br>
                                      <br>
                                      /**<br>
                                      &nbsp;&nbsp;&nbsp;&nbsp; * Property: schema<br>
                                      &nbsp;&nbsp;&nbsp;&nbsp; * {String} Optional schema
                                      location that will be included in
                                      the<br>
                                      &nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; schemaLocation
                                      attribute value.&nbsp; Note that the
                                      feature type schema<br>
                                      &nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; is required for a
                                      strict XML validator (on
                                      transactions with an<br>
                                      &nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; insert for example),
                                      but is *not* required by the WFS
                                      specification<br>
                                      &nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; (since the server is
                                      supposed to know about feature
                                      type schemas).<br>
                                      &nbsp;&nbsp;&nbsp;&nbsp; */<br>
                                      &nbsp;&nbsp;&nbsp; schema: null,<br>
                                      <br>
                                      <br>
                                      Basicamente e' um URL que define o
                                      schema dos dados em XML e que pode
                                      ser usado para validar os
                                      conteudos, no exemplo passas um
                                      DescribeFeatureType que gera un
                                      esquema que define a estrutura do
                                      XML dos teus dados.&nbsp; Em varios
                                      exemplos nunca vi o uso do schema:<br>
                                      <br>
                                      <a moz-do-not-send="true"
                                        href="http://workshops.opengeo.org/stack-intro/openlayers.html"
                                        target="_blank">http://workshops.opengeo.org/stack-intro/openlayers.html</a><br>
                                      <br>
                                      Eu uso mais mapserver, ja que nao
                                      me dou muito bem com o JAVA (serei
                                      demasiado calhau?) <br>
                                      <br>
                                      <blockquote type="cite">
                                        <pre><span><pre><span><pre><pre><b>
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>
                                      </blockquote>
                                      uma livraria no localhost e' mais
                                      rapida para fazer o upload e nao
                                      estas dependente de "terceiros" <br>
                                      <br>
                                      E para concluir: O firebug e' o
                                      melhor amigo do Homem (depois do
                                      cao e' claro)<br>
                                      <br>
                                      <br>
                                      Bom feriado, eu vou marfar <br>
                                      <br>
                                      Jorge<br>
                                      <br>
                                      <pre cols="72">-- 
PGP public key: 0x595FF9D3</pre>
                                      <br>
                                      <hr>
                                      <p><font face="Arial" size="1">
                                          Plymouth Marine Laboratory<br>
                                          Registered Office: <br>
                                          Prospect Place<br>
                                          The Hoe<br>
                                          Plymouth PL1 3DH </font></p>
                                      <p><font face="Arial" size="1">Website:
                                          <a moz-do-not-send="true"
                                            href="http://www.pml.ac.uk"
                                            target="_blank">www.pml.ac.uk</a>
                                          <br>
                                          <a moz-do-not-send="true"
                                            href="http://www.pml.ac.uk/pdf/PMLAR2010.pdf"
                                            target="_blank">Click here
                                            for PML Annual Review</a> <br>
                                          Registered Charity No. 1091222<br>
                                          PML is a company limited by
                                          guarantee<br>
                                          registered in England &amp;
                                          Wales<br>
                                          company number 4178503</font></p>
                                      <p><font color="green"
                                          face="Arial" size="1">Please
                                          think before you print.</font></p>
                                      <hr>
                                      <p><font face="Arial" size="1">This
                                          e-mail, its content and any
                                          file attachments are
                                          confidential.</font></p>
                                      <p><font face="Arial" size="1">If
                                          you have received this e-mail
                                          in error please do not copy,
                                          disclose it to any third party
                                          or use the contents or
                                          attachments in any way. Please
                                          notify the sender by replying
                                          to this e-mail or e-mail <a
                                            moz-do-not-send="true"
                                            href="mailto:forinfo@pml.ac.uk"
                                            target="_blank">forinfo@pml.ac.uk</a>
                                          and then delete the email
                                          without making any copies or
                                          using it in any other way.</font></p>
                                      <p><font face="Arial" size="1">The
                                          content of this message may
                                          contain personal views which
                                          are not the views of Plymouth
                                          Marine Laboratory unless
                                          specifically stated.</font></p>
                                      <p><font face="Arial" size="1">You
                                          are reminded that e-mail
                                          communications are not secure
                                          and may contain viruses.
                                          Plymouth Marine Laboratory
                                          accepts no liability for any
                                          loss or damage which may be
                                          caused by viruses.</font></p>
                                      <hr> <br>
                                      <br>
                                    </blockquote>
                                    <br>
                                  </blockquote>
                                  <br>
                                  <br>
                                  <pre cols="72">-- 
PGP public key: 0x595FF9D3</pre>
                                  <br>
                                  <hr>
                                  <p><font face="Arial" size="1">
                                      Plymouth Marine Laboratory<br>
                                      Registered Office: <br>
                                      Prospect Place<br>
                                      The Hoe<br>
                                      Plymouth PL1 3DH </font></p>
                                  <p><font face="Arial" size="1">Website:
                                      <a moz-do-not-send="true"
                                        href="http://www.pml.ac.uk"
                                        target="_blank">www.pml.ac.uk</a>
                                      <br>
                                      <a moz-do-not-send="true"
                                        href="http://www.pml.ac.uk/pdf/PMLAR2010.pdf"
                                        target="_blank">Click here for
                                        PML Annual Review</a> <br>
                                      Registered Charity No. 1091222<br>
                                      PML is a company limited by
                                      guarantee<br>
                                      registered in England &amp; Wales<br>
                                      company number 4178503</font></p>
                                  <p><font color="green" face="Arial"
                                      size="1">Please think before you
                                      print.</font></p>
                                  <hr>
                                  <p><font face="Arial" size="1">This
                                      e-mail, its content and any file
                                      attachments are confidential.</font></p>
                                  <p><font face="Arial" size="1">If you
                                      have received this e-mail in error
                                      please do not copy, disclose it to
                                      any third party or use the
                                      contents or attachments in any
                                      way. Please notify the sender by
                                      replying to this e-mail or e-mail
                                      <a moz-do-not-send="true"
                                        href="mailto:forinfo@pml.ac.uk"
                                        target="_blank">forinfo@pml.ac.uk</a>
                                      and then delete the email without
                                      making any copies or using it in
                                      any other way.</font></p>
                                  <p><font face="Arial" size="1">The
                                      content of this message may
                                      contain personal views which are
                                      not the views of Plymouth Marine
                                      Laboratory unless specifically
                                      stated.</font></p>
                                  <p><font face="Arial" size="1">You are
                                      reminded that e-mail
                                      communications are not secure and
                                      may contain viruses. Plymouth
                                      Marine Laboratory accepts no
                                      liability for any loss or damage
                                      which may be caused by viruses.</font></p>
                                  <hr> <br>
                                  <br>
                                </blockquote>
                                <br>
                                <br>
                                <pre><fieldset></fieldset>
_______________________________________________
Portugal mailing list
<a moz-do-not-send="true" href="mailto:Portugal@lists.osgeo.org" target="_blank">Portugal@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
                              </blockquote>
                              <br>
                              <br>
                              <pre cols="72">-- 
PGP public key: 0x595FF9D3</pre>
                              <br>
                              <hr>
                              <p><font face="Arial" size="1"> Plymouth
                                  Marine Laboratory<br>
                                  Registered Office: <br>
                                  Prospect Place<br>
                                  The Hoe<br>
                                  Plymouth PL1 3DH </font></p>
                              <p><font face="Arial" size="1">Website: <a
                                    moz-do-not-send="true"
                                    href="http://www.pml.ac.uk"
                                    target="_blank">www.pml.ac.uk</a> <br>
                                  <a moz-do-not-send="true"
                                    href="http://www.pml.ac.uk/pdf/PMLAR2010.pdf"
                                    target="_blank">Click here for PML
                                    Annual Review</a> <br>
                                  Registered Charity No. 1091222<br>
                                  PML is a company limited by guarantee<br>
                                  registered in England &amp; Wales<br>
                                  company number 4178503</font></p>
                              <p><font color="green" face="Arial"
                                  size="1">Please think before you
                                  print.</font></p>
                              <hr>
                              <p><font face="Arial" size="1">This
                                  e-mail, its content and any file
                                  attachments are confidential.</font></p>
                              <p><font face="Arial" size="1">If you have
                                  received this e-mail in error please
                                  do not copy, disclose it to any third
                                  party or use the contents or
                                  attachments in any way. Please notify
                                  the sender by replying to this e-mail
                                  or e-mail <a moz-do-not-send="true"
                                    href="mailto:forinfo@pml.ac.uk"
                                    target="_blank">forinfo@pml.ac.uk</a>
                                  and then delete the email without
                                  making any copies or using it in any
                                  other way.</font></p>
                              <p><font face="Arial" size="1">The content
                                  of this message may contain personal
                                  views which are not the views of
                                  Plymouth Marine Laboratory unless
                                  specifically stated.</font></p>
                              <p><font face="Arial" size="1">You are
                                  reminded that e-mail communications
                                  are not secure and may contain
                                  viruses. Plymouth Marine Laboratory
                                  accepts no liability for any loss or
                                  damage which may be caused by viruses.</font></p>
                              <hr> <br>
                              <br>
                            </blockquote>
                            <br>
                          </blockquote>
                          <br>
                          <br>
                          <pre cols="72">-- 
PGP public key: 0x595FF9D3</pre>
                          <br>
                          <hr>
                          <p><font face="Arial" size="1"> Plymouth
                              Marine Laboratory<br>
                              Registered Office: <br>
                              Prospect Place<br>
                              The Hoe<br>
                              Plymouth PL1 3DH </font></p>
                          <p><font face="Arial" size="1">Website: <a
                                moz-do-not-send="true"
                                href="http://www.pml.ac.uk"
                                target="_blank">www.pml.ac.uk</a> <br>
                              <a moz-do-not-send="true"
                                href="http://www.pml.ac.uk/pdf/PMLAR2010.pdf"
                                target="_blank">Click here for PML
                                Annual Review</a> <br>
                              Registered Charity No. 1091222<br>
                              PML is a company limited by guarantee<br>
                              registered in England &amp; Wales<br>
                              company number 4178503</font></p>
                          <p><font color="green" face="Arial" size="1">Please
                              think before you print.</font></p>
                          <hr>
                          <p><font face="Arial" size="1">This e-mail,
                              its content and any file attachments are
                              confidential.</font></p>
                          <p><font face="Arial" size="1">If you have
                              received this e-mail in error please do
                              not copy, disclose it to any third party
                              or use the contents or attachments in any
                              way. Please notify the sender by replying
                              to this e-mail or e-mail <a
                                moz-do-not-send="true"
                                href="mailto:forinfo@pml.ac.uk"
                                target="_blank">forinfo@pml.ac.uk</a>
                              and then delete the email without making
                              any copies or using it in any other way.</font></p>
                          <p><font face="Arial" size="1">The content of
                              this message may contain personal views
                              which are not the views of Plymouth Marine
                              Laboratory unless specifically stated.</font></p>
                          <p><font face="Arial" size="1">You are
                              reminded that e-mail communications are
                              not secure and may contain viruses.
                              Plymouth Marine Laboratory accepts no
                              liability for any loss or damage which may
                              be caused by viruses.</font></p>
                          <hr> <br>
                          <br>
                        </blockquote>
                        <br>
                      </blockquote>
                      <br>
                      <br>
                      <pre cols="72">-- 
PGP public key: 0x595FF9D3</pre>
                      <br>
                      <hr>
                      <p><font face="Arial" size="1"> Plymouth Marine
                          Laboratory<br>
                          Registered Office: <br>
                          Prospect Place<br>
                          The Hoe<br>
                          Plymouth PL1 3DH </font></p>
                      <p><font face="Arial" size="1">Website: <a
                            moz-do-not-send="true"
                            href="http://www.pml.ac.uk" target="_blank">www.pml.ac.uk</a>
                          <br>
                          <a moz-do-not-send="true"
                            href="http://www.pml.ac.uk/pdf/PMLAR2010.pdf"
                            target="_blank">Click here for PML Annual
                            Review</a> <br>
                          Registered Charity No. 1091222<br>
                          PML is a company limited by guarantee<br>
                          registered in England &amp; Wales<br>
                          company number 4178503</font></p>
                      <p><font color="green" face="Arial" size="1">Please
                          think before you print.</font></p>
                      <hr>
                      <p><font face="Arial" size="1">This e-mail, its
                          content and any file attachments are
                          confidential.</font></p>
                      <p><font face="Arial" size="1">If you have
                          received this e-mail in error please do not
                          copy, disclose it to any third party or use
                          the contents or attachments in any way. Please
                          notify the sender by replying to this e-mail
                          or e-mail <a moz-do-not-send="true"
                            href="mailto:forinfo@pml.ac.uk"
                            target="_blank">forinfo@pml.ac.uk</a> and
                          then delete the email without making any
                          copies or using it in any other way.</font></p>
                      <p><font face="Arial" size="1">The content of this
                          message may contain personal views which are
                          not the views of Plymouth Marine Laboratory
                          unless specifically stated.</font></p>
                      <p><font face="Arial" size="1">You are reminded
                          that e-mail communications are not secure and
                          may contain viruses. Plymouth Marine
                          Laboratory accepts no liability for any loss
                          or damage which may be caused by viruses.</font></p>
                      <hr> <br>
                      <br>
                    </blockquote>
                    <br>
                  </blockquote>
                  <br>
                  <br>
                  <pre cols="72">-- 
PGP public key: 0x595FF9D3</pre>
                  <br>
                  <hr>
                  <p><font face="Arial" size="1"> Plymouth Marine
                      Laboratory<br>
                      Registered Office: <br>
                      Prospect Place<br>
                      The Hoe<br>
                      Plymouth PL1 3DH </font></p>
                  <p><font face="Arial" size="1">Website: <a
                        moz-do-not-send="true"
                        href="http://www.pml.ac.uk" target="_blank">www.pml.ac.uk</a>
                      <br>
                      <a moz-do-not-send="true"
                        href="http://www.pml.ac.uk/pdf/PMLAR2010.pdf"
                        target="_blank">Click here for PML Annual Review</a>
                      <br>
                      Registered Charity No. 1091222<br>
                      PML is a company limited by guarantee<br>
                      registered in England &amp; Wales<br>
                      company number 4178503</font></p>
                  <p><font color="green" face="Arial" size="1">Please
                      think before you print.</font></p>
                  <hr>
                  <p><font face="Arial" size="1">This e-mail, its
                      content and any file attachments are confidential.</font></p>
                  <p><font face="Arial" size="1">If you have received
                      this e-mail in error please do not copy, disclose
                      it to any third party or use the contents or
                      attachments in any way. Please notify the sender
                      by replying to this e-mail or e-mail <a
                        moz-do-not-send="true"
                        href="mailto:forinfo@pml.ac.uk" target="_blank">forinfo@pml.ac.uk</a>
                      and then delete the email without making any
                      copies or using it in any other way.</font></p>
                  <p><font face="Arial" size="1">The content of this
                      message may contain personal views which are not
                      the views of Plymouth Marine Laboratory unless
                      specifically stated.</font></p>
                  <p><font face="Arial" size="1">You are reminded that
                      e-mail communications are not secure and may
                      contain viruses. Plymouth Marine Laboratory
                      accepts no liability for any loss or damage which
                      may be caused by viruses.</font></p>
                  <hr> <br>
                  <br>
                </blockquote>
                <br>
              </div>
            </div>
          </div>
          <br>
          _______________________________________________<br>
          Portugal mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.osgeo.org/mailman/listinfo/portugal"
            target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Portugal mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/portugal">http://lists.osgeo.org/mailman/listinfo/portugal</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>