<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    &nbsp;&nbsp;&nbsp; Conheces algum exemplo do evento zoomend para eu tentar
    guiar-me?<br>
    <br>
    Obrigado<br>
    <pre class="moz-signature" cols="72">

</pre>
    <br>
    Em 13-12-2011 12:45, Hugo escreveu:
    <blockquote
cite="mid:CAFtnPwpCnNqxxwSwJB02+7atVQPF6j=dy3zO5QYmHrZG58x+bg@mail.gmail.com"
      type="cite">Experimenta adicionar o seguinte &agrave;s op&ccedil;&otilde;es do teu
      mapa:
      <div><br>
      </div>
      <div>restrictedExtent: new OpenLayers.Bounds(.....);</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div>De qualquer maneira, qd usas layers comerciais (google,
        yahoo, etc), tens que definir tb nas layers algumas restri&ccedil;&otilde;es
        nomeadamente as resolu&ccedil;&otilde;es m&aacute;ximas, etc...</div>
      <div><br>
      </div>
      <div>Ou seja, o facto de definires o restricted extent n&atilde;o vai
        impedir de veres o mundo inteiro. Ent&atilde;o podes fazer como te
        disse, ou ainda, podes adicionar um evento ao map on zoomend e
        detectas qual a resolu&ccedil;&atilde;o e se for maior que aquela que tu
        queres permitir entao fazes um zoom ao mapa... desta forma
        consegues eliminar a visualiza&ccedil;&atilde;o do mundo inteiro.</div>
      <div><br>
      </div>
      <div>Abc,</div>
      <div><br>
      </div>
      <div>Hugo</div>
      <div><br>
        <div class="gmail_quote">2011/12/13 Pedro Costa <span dir="ltr">&lt;<a
              moz-do-not-send="true"
              href="mailto:pedrocostaarma@sapo.pt">pedrocostaarma@sapo.pt</a>&gt;</span><br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Obrigado Hugo.<br>
              Eu estou a tentar que o exemplo do link abra na &aacute;rea que
              pretendo mas est&aacute; dificil.<br>
              <br>
              <a moz-do-not-send="true"
                href="http://www.pgrouting.org/docs/ol-workshop/ch05.html"
                target="_blank">http://www.pgrouting.org/docs/ol-workshop/ch05.html</a><br>
              <br>
              Por exemplo, abri o exemplo original fiz zoom na &aacute;rea que
              pretendo e com o firebug fiz map.getExtent(). Assim obtive
              os valores da bounding box que queria penso eu:<br>
              <br>
              bottom <br>
              &nbsp;&nbsp;&nbsp; 5066053.4452291&nbsp;&nbsp; <br>
              left <br>
              &nbsp;&nbsp;&nbsp; -929102.37877511<br>
              right <br>
              &nbsp;&nbsp;&nbsp; -921458.67594797<br>
              top <br>
              &nbsp;&nbsp;&nbsp; 5070353.0280693<br>
              <br>
              A seguir inseri na variavel options coloquei estes valores
              mas mesmo assim n&atilde;o, abre na &aacute;rea que queria.<br>
              <br>
              Algu&eacute;m tem ideia porqu&ecirc;?
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  On 13-12-2011 12:16, Pedro Costa wrote:
                  <blockquote type="cite"> Pessoal podem ajudar-me no
                    seguinte:<br>
                    Tenho esta parte do c&oacute;digo:<br>
                    <br>
                    <br>
                    <pre> <span>var</span> <span>options</span> <span>=</span> <span>{</span>

                    <span>projection</span><span>:</span> <span>new</span> <span>OpenLayers</span><span>.</span><span>Projection</span><span>(</span><span>"EPSG:900913"</span><span>),</span>

                    <span></span><span>units</span><span>:</span> <span>"m"</span><span>,</span>

                    <span>numZoomLevels</span><span>:</span> <span>22</span><span>,</span>

                    <span>maxResolution</span><span>:</span> <span>156543.0339</span><span>,</span>

                    <span>maxExtent</span><span>:</span> <span>new</span> <span>OpenLayers</span><span>.</span><span>Bounds</span><span>(</span><span>-</span><span>20037508</span><span>,</span> <span>-</span><span>20037508</span><span>,</span>

                                                     <span>20037508</span><span>,</span> <span>20037508.34</span><span>)</span>

                <span>};</span></pre>
                    <br>
                    retirado de: <a moz-do-not-send="true"
                      href="http://www.pgrouting.org/docs/ol-workshop/ch05.html"
                      target="_blank">http://www.pgrouting.org/docs/ol-workshop/ch05.html</a><br>
                    <br>
                    <br>
                    Significa que o mapa vai estar na projec&ccedil;&atilde;o 900913.
                    Neste exempo eu quero mudar a area a ser apresentada
                    por isso tenho de mudar o maxExtend certo?<br>
                    A quest&atilde;o &eacute; se eu no geoserver definir o srs como
                    900913 e calcular, tenho os valores da bounding
                    box,e &eacute; so substituir ou estou errado?<br>
                    <br>
                    Pelo que percebi:<br>
                    <br>
                    <pre><span>-</span><span>20037508 
(left = min X)


</span><span>-</span><span>20037508</span><span></span>
(bottom = min y)

<span>20037508</span><span></span>

(right = max X)

<span>20037508.34</span><span></span>

(top = max y)


Estou correcto?

obrigado

</pre>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    On 13-12-2011 11:11, Jorge de Jesus wrote:
                    <blockquote type="cite"> <br>
                      Oi<br>
                      <br>
                      Pelo que vejo:<br>
                      <br>
                      1) Nao tens a proxy instalada para poderes
                      contactar <a moz-do-not-send="true"
                        href="http://localhost:8080" target="_blank">http://localhost:8080</a><br>
                      <br>
                      <a moz-do-not-send="true"
href="http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#HowdoIsetupaProxyHost"
                        target="_blank">http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#HowdoIsetupaProxyHost</a><br>
                      <br>
                      Ate teres a proxy instalada o browser nao vai
                      pedir nada ao servidor...<br>
                      <br>
                      2) Tens duas vezes projection:<br>
                      projection: 'map.getProjectionObject()',<br>
                      reproject: 'True',<br>
                      projection: new OpenLayers.Projection('4326'),<br>
                      <br>
                      Geralmente JS usa o ultimo valor definido,
                      portanto estas a usar projeccao 4325<br>
                      <br>
                      3) O uso correct the OpenLayers.Projection e' com
                      EPSG<br>
                      <br>
                      OpenLayers.Projection("EPSG:4326")<br>
                      <br>
                      All the best<br>
                      <br>
                      Jorge<br>
                      <br>
                      <br>
                      On 13/12/11 10:50, Pedro Costa wrote:
                      <blockquote type="cite"> Acho que o problema &eacute;
                        mesmo os wms que n&atilde;o s&atilde;o reprojectados:<br>
                        Reparem neste exemplo que fiz:<br>
                        <br>
                        <br>
                        <a moz-do-not-send="true"
                          href="http://pastebin.com/6i9TEWsH"
                          target="_blank">http://pastebin.com/6i9TEWsH</a><br>
                        <br>
                        <br>
                        <br>
                        Simplesmente n&atilde;o aparece o wms<br>
                        <br>
                        <br>
                        <br>
                        <br>
                        <br>
                        On 12-12-2011 09:38, Jorge de Jesus wrote:
                        <blockquote type="cite"> <br>
                          Bons dias<br>
                          <br>
                          <br>
                          Bem, se tens acerteza que o wms funciona sem
                          problemas&nbsp; sem o layer proprietario, o mais
                          provavel e' que o WMS nao supporta EPSG:900913
                          ou gera um erro quando fazes o pedido.<br>
                          <br>
                          No firebug, ve os pedidos feitos pela pagina
                          (Seccao Net) e ve o pedido feito ao servidor e
                          a resposta data.<br>
                          <br>
                          Por exemplo tenho um sistema que faz o
                          seguinte pedido: <br>
                          <br>
                          <a moz-do-not-send="true"
href="http://localhost/rasdaman/wms.py?LAYERS=rasdamanImage&amp;FORMAT=image%2Fpng&amp;TIME=2011-06-20&amp;STRATEGIES=%5Bobject%20Object%5D&amp;TRANSPARENT=TRUE&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;SRS=EPSG%3A900913&amp;BBOX=-6300637.7833253,4684889.401321,6076045.8348875,10359574.380423&amp;WIDTH=1265&amp;HEIGHT=580"
                            target="_blank">http://localhost/rasdaman/wms.py?LAYERS=rasdamanImage&amp;FORMAT=image%2Fpng&amp;TIME=2011-06-20&amp;STRATEGIES=%5Bobject%20Object%5D&amp;TRANSPARENT=TRUE&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;SRS=EPSG%3A900913&amp;BBOX=-6300637.7833253,4684889.401321,6076045.8348875,10359574.380423&amp;WIDTH=1265&amp;HEIGHT=580</a><br>
                          <br>
                          Experimenta a fazer um pedido ao teu WMS
                          usando SRS=EPSG%3A900913<br>
                          <br>
                          Jorge<br>
                          <br>
                          <br>
                          On 10/12/11 15:25, Pedro Costa wrote:
                          <blockquote type="cite"> Jorge,<br>
                            <br>
                            Sim lembro-me.Esclarece-me s&oacute; a seguinte
                            d&uacute;vida, o que &eacute; que o browser n&atilde;o est&aacute; a
                            conseguir ir buscar na tua opini&atilde;o mais
                            precisamente? &Eacute; que ele vai buscar o layer
                            propriet&aacute;rio, os wms &eacute; que n&atilde;o. Mas noutros
                            exercicios que efectuei sem o layer
                            proprietario ele ia buscar tudo.<br>
                            <br>
                            <br>
                            Obrigado<br>
                            bom fim de semana<br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            <br>
                            On 10-12-2011 09:26, Jorge Mendes de Jesus
                            wrote:
                            <blockquote type="cite">
                              <p><font>Oi<br>
                                  <br>
                                  Parece tudo em ordem, mas tens um
                                  ligeiro problema :)<br>
                                  <br>
                                  Lembras-te da explicacao relativa a
                                  cross-domain, ou seja podes acecer a
                                  outros URLs partir de Javascript ?!
                                  Pois quando tens um url com uma porta
                                  diferente tens a mesma situacao, ou
                                  seja:<br>
                                  <br>
                                  <a moz-do-not-send="true"
                                    href="http://localhost:8080"
                                    target="_blank">http://localhost:8080</a><br>
                                  <br>
                                  &egrave; um URL differente e tens de usar uma
                                  proxy para buscar os resultados. Eu
                                  sempre pensei que mesmo com uma porta
                                  difererente nao haveria problemas mas
                                  &agrave; alguns meses algume teve o mesmo
                                  problema e foi tudo explicado no
                                  mailing list, acho que podes procurar
                                  no google pelos emails mais antigos.<br>
                                  <br>
                                  Alem disso, tens o WMS a funcionar a
                                  100%? Experimentaste a fazer uma
                                  pedido com EPSG:900913 ??<br>
                                  <br>
                                  Jorge<br>
                                  <br>
                                  <br>
                                  -----Original Message-----<br>
                                  From: <a moz-do-not-send="true"
                                    href="mailto:portugal-bounces@lists.osgeo.org"
                                    target="_blank">portugal-bounces@lists.osgeo.org</a>
                                  on behalf of Pedro Costa<br>
                                  Sent: Fri 09/12/2011 13:47<br>
                                  To: <a moz-do-not-send="true"
                                    href="mailto:portugal@lists.osgeo.org"
                                    target="_blank">portugal@lists.osgeo.org</a><br>
                                  Subject: Re: [Portugal] duvidas sobre
                                  openlayers<br>
                                  <br>
                                  On 09-12-2011 09:22, Jorge de Jesus
                                  wrote:<br>
                                  &gt; No meu caso nao defino a
                                  projeccao da camada WMS e o OpenLayers
                                  usa a<br>
                                  &gt; projeccao da baseLayer da google
                                  para tudo, o meu WMS tem suporte<br>
                                  &gt; nativo para 900913. Acho que
                                  devia ter tido mais atencao ao codigo
                                  e<br>
                                  &gt; seria mais correcto adicionar a
                                  informacao da projeccao<br>
                                  &gt;<br>
                                  &gt; projection:
                                  map.getProjectionObject()<br>
                                  <br>
                                  <br>
                                  <br>
                                  Tentei assim:<br>
                                  <br>
                                  <a moz-do-not-send="true"
                                    href="http://pastebin.com/WLkRVbxu"
                                    target="_blank">http://pastebin.com/WLkRVbxu</a><br>
                                  <br>
                                  <br>
                                  Mas continuo sem sucesso, s&oacute; &eacute; visivel
                                  o layer propriet&aacute;rio. Nem sequer<br>
                                  aparece o "+" do layer switcher, n&atilde;o
                                  percebo o porqu&ecirc;...<br>
                                  <br>
                                  Alguma sugest&atilde;o?<br>
                                  <br>
                                  Obrigado<br>
                                  <br>
                                  <br>
                                  PS: O firebug tb n&atilde;o detecta nenhum
                                  erro.<br>
_______________________________________________<br>
                                  Portugal mailing list<br>
                                  <a moz-do-not-send="true"
                                    href="mailto:Portugal@lists.osgeo.org"
                                    target="_blank">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>
                                </font> </p>
                              <br>
                              <fieldset></fieldset>
                              <br>
                              <pre>_______________________________________________
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>
                            <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>
                          <br>
                          <fieldset></fieldset>
                          <br>
                          <pre>_______________________________________________
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>
                        <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>
                      <br>
                      <fieldset></fieldset>
                      <br>
                      <pre>_______________________________________________
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>
                  </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 clear="all">
        <div><br>
        </div>
        -- <br>
        Hugo Martins<br>
        LabNT - ISEGI UNL<br>
        Campus de Campolide<br>
        1070-312 Lisboa<br>
        N 38&deg;43'56.84", W 9&deg;9'35.74"<br>
      </div>
      <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>
  </body>
</html>