<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Gracias por el "force Openlayers to use that EPSG code instead", <span
class="moz-smiley-s1"><span> :-) </span></span><br>
<br>
Jorge<br>
<br>
On 13/06/11 09:33, Ragi Burhum wrote:
<blockquote
cite="mid:BANLkTikGB3vBgagqb1y+iQ2dB8+mXoo_cA@mail.gmail.com"
type="cite">
<meta charset="utf-8">
<span class="Apple-style-span" style="border-collapse: collapse;
color: rgb(51, 51, 51); font-family: 'Helvetica
Neue',Helvetica,Arial,sans-serif; font-size: 14px; line-height:
18px;">
<p style="margin: 0px 0px 1em; padding: 0px; border-width: 0px;
font-size: 14px; vertical-align: baseline; clear: both;
word-wrap: break-word;">
Hola a todos,</p>
<p style="margin: 0px 0px 1em; padding: 0px; border-width: 0px;
font-size: 14px; vertical-align: baseline; clear: both;
word-wrap: break-word;">
Aquí les ago un copy/paste del mensaje:</p>
<p style="margin: 0px 0px 1em; padding: 0px; border-width: 0px;
font-size: 14px; vertical-align: baseline; clear: both;
word-wrap: break-word;">
<b>"</b>As mkennedy points out, the official EPSG code for
SphericalMercator (aka Google's projection) is 3857 and a
previous assigned number was 3785. If you are wondering why
there are so many numbers that refer to the same spatial
reference, <a moz-do-not-send="true"
href="http://crschmidt.net/blog/archives/243/google-projection-900913/"
rel="nofollow" style="margin: 0px; padding: 0px;
border-width: 0px; font-size: 14px; vertical-align:
baseline; text-decoration: none; cursor: pointer; color:
rgb(23, 111, 140);">crschmidt's blog post will give you a
clue</a>...</p>
<p style="margin: 0px 0px 1em; padding: 0px; border-width: 0px;
font-size: 14px; vertical-align: baseline; clear: both;
word-wrap: break-word;">
Ian pointed out the relevant OpenLayer's documentation section
to <a moz-do-not-send="true"
href="http://docs.openlayers.org/library/spherical_mercator.html#sphericalmercator-and-epsg-aliases"
rel="nofollow" style="margin: 0px; padding: 0px;
border-width: 0px; font-size: 14px; vertical-align:
baseline; text-decoration: none; cursor: pointer; color:
rgb(23, 111, 140);">force OpenLayers to use that EPSG code
instead</a>.</p>
<p style="margin: 0px 0px 1em; padding: 0px; border-width: 0px;
font-size: 14px; vertical-align: baseline; clear: both;
word-wrap: break-word;">
Since your GetCapabilities section shows 3785, the code from
the OL documentation won't work as is, you will need to
replace all the 3857 for 3785."</p>
<p style="margin: 0px 0px 1em; padding: 0px; border-width: 0px;
font-size: 14px; vertical-align: baseline; clear: both;
word-wrap: break-word;">
El servidor de Jorge si soporta la proyección de Google, sólo
hay que forzar a OL a que use ese código (las instrucciones
están en ese link).</p>
<p style="margin: 0px 0px 1em; padding: 0px; border-width: 0px;
font-size: 14px; vertical-align: baseline; clear: both;
word-wrap: break-word;">
Saludos,</p>
<p style="margin: 0px 0px 1em; padding: 0px; border-width: 0px;
font-size: 14px; vertical-align: baseline; clear: both;
word-wrap: break-word;">
- Ragi</p>
</span><br>
<div class="gmail_quote">2011/6/13 Jorge de Jesus <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:jmdj@pml.ac.uk">jmdj@pml.ac.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> Hola a todos (Jorge y
Jorge et al.)<br>
<br>
Ayer estava mirando al libro de OpenLayers2.10, y dicia muy
claro:<br>
<br>
"Se tienes un google layer como base, y tienes que anadir un
WMS, el WMS tiene que esta en el mismo proyectado de google
(EPSG:900913)", (aun que EPSG:3785 sea +-/ el mismo.)<br>
<br>
Tu servidor WMS tiene que suportar el EPSG:900913, y
OpenLayers solo va a trabajar con este proyectado.<br>
<br>
Y por el pop up de map data, tienes que anadir el seguinte
CSS:<br>
<br>
.olLayerGoogleCopyright {<br>
visibility:hidden;<br>
}<br>
<br>
<br>
o entonces algo como top:-10000px;<br>
<br>
Jorge
<div>
<div class="h5"><br>
<br>
On 12/06/11 19:03, Ragi Burhum wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div class="gmail_quote">
<div>Jorge y Jorge :)</div>
<div><br>
</div>
<div>Ya puse una respuesta a esta pregunta en <a
moz-do-not-send="true" href="http://GIS.SE"
target="_blank">GIS.SE</a> <a
moz-do-not-send="true"
href="http://gis.stackexchange.com/questions/10916/openlayers-weird-problem-with-googlemaps-base-layer-and-wms-overlay/10920#10920"
target="_blank">http://gis.stackexchange.com/questions/10916/openlayers-weird-problem-with-googlemaps-base-layer-and-wms-overlay/10920#10920</a></div>
<div><br>
</div>
<div>Inclusive, uno de los creadores de Openlayers
le dió un +1 a la respuesta, así que pueden estar
seguros que es la correcta. :)</div>
<div><br>
</div>
<div>Saludos,</div>
<div><br>
</div>
<div>- Ragi</div>
<div> </div>
<blockquote class="gmail_quote" style="margin: 0pt
0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
204, 204); padding-left: 1ex;">Message: 1<br>
Date: Sun, 12 Jun 2011 16:41:29 +0200<br>
From: Jorge Ar?valo <<a moz-do-not-send="true"
href="mailto:jorge.arevalo@deimos-space.com"
target="_blank">jorge.arevalo@deimos-space.com</a>><br>
Subject: Re: [Spanish] WMS Catastro + OpenLayers<br>
To: "Cap&amp, amp, amp, #237, tulo Local de
la comunidad<br>
hispano-hablante" <<a
moz-do-not-send="true"
href="mailto:spanish@lists.osgeo.org"
target="_blank">spanish@lists.osgeo.org</a>><br>
Message-ID: <BANLkTi=<a moz-do-not-send="true"
href="mailto:2c9hYjsidC3vEPtg19Fm4WvQLtQ@mail.gmail.com" target="_blank">2c9hYjsidC3vEPtg19Fm4WvQLtQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
Buenas,<br>
<br>
Muchas gracias crack. La pena es que no me ha
funcionado :-(. He<br>
probado también a usar la versión estable de
OpenLayers<br>
<a moz-do-not-send="true"
href="http://openlayers.org/api/OpenLayers.js"
target="_blank">http://openlayers.org/api/OpenLayers.js</a>,
en lugar de la versión en<br>
desarrollo, y me dice lo mismo.<br>
<br>
Otra cosa algo molesta es que siempre me sale un
popup con el<br>
copyright de TeleAtlas. Pero bueno, es un problema
menor. Si conseguis<br>
poner el WMS del catastro sobre una capa de
GoogleMaps en OpenLayers,<br>
me haréis un gran favor. Ya digo que con la API de
Google Maps<br>
directamente ha sido sencillo.<br>
<br>
Muchas gracias en cualquier caso :-)<br>
<br>
Jorge<br>
<br>
2011/6/12 Jorge Gaspar Sanz Salinas <<a
moz-do-not-send="true"
href="mailto:jsanz@osgeo.org" target="_blank">jsanz@osgeo.org</a>>:<br>
> El 11/06/2011 17:41, Jorge Arévalo escribió:<br>
>> Buenas,<br>
>><br>
>> Estoy intentando superponer una capa del
WMS del catastro sobre una<br>
>> capa base de GoogleMaps en OpenLayers.
Usando la API de GoogleMaps lo<br>
>> hice sin problemas, aprovechando que el
WMS del catastro ofrece el<br>
>> EPSG:3785, pero al intentarlo en
OpenLayers me está pasando una cosa<br>
>> rara. Me explico:<br>
>><br>
>> Si la capa la defino así en OpenLayers<br>
>><br>
>> var catastro_layer = new
OpenLayers.Layer.WMS(<br>
>> "WMS Catastro",<br>
>> "<a moz-do-not-send="true"
href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1"
target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1</a>",<br>
>> {<br>
>> layers: "catastro",<br>
>> format:"image/png",<br>
>> srs: "EPSG:3785",<br>
>> transparent: false<br>
>> }<br>
>> );<br>
>><br>
>> Me aparece la capa WMS como una capa más,
elegible en lugar de la de<br>
>> Google, pero NO superponible sobre ella.
En esta captura se ve lo que<br>
>> quiero decir: <a moz-do-not-send="true"
href="http://dl.dropbox.com/u/6599273/capa_wms1.png" target="_blank">http://dl.dropbox.com/u/6599273/capa_wms1.png</a><br>
>><br>
>> En este caso, la petición WMS se genera
correctamente. Aquí un ejemplo:<br>
>><br>
>> <a moz-do-not-send="true"
href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1&LAYERS=catastro&FORMAT=image%2Fpng&SRS=EPSG%3A3785&TRANSPARENT=false&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-1721973.3737,3228700.0733875,-1702405.4944625,3248267.952625&WIDTH=256&HEIGHT=256"
target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1&LAYERS=catastro&FORMAT=image%2Fpng&SRS=EPSG%3A3785&TRANSPARENT=false&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-1721973.3737,3228700.0733875,-1702405.4944625,3248267.952625&WIDTH=256&HEIGHT=256</a><br>
>><br>
>> Pero no me vale porque yo quiero la capa
WMS encima de la de Google<br>
>> Maps, no en lugar de ella.<br>
>><br>
>> En cambio, si defino la capa así (solo he
cambiado el transparent de<br>
>> false a true):<br>
>><br>
>> var catastro_layer = new
OpenLayers.Layer.WMS(<br>
>> "WMS Catastro",<br>
>> "<a moz-do-not-send="true"
href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1"
target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1</a>",<br>
>> {<br>
>> layers: "catastro",<br>
>> format:"image/png",<br>
>> srs: "EPSG:3785",<br>
>> transparent: true<br>
>> }<br>
>> );<br>
>><br>
>> La capa WMS ya aparece como una capa
superpuesta sobre la capa base<br>
>> (como si hubiera especificado
"isBaseLayer:false", aunque no lo he<br>
>> hecho). En la captura se ve:<br>
>> <a moz-do-not-send="true"
href="http://dl.dropbox.com/u/6599273/capa_wms2.png"
target="_blank">http://dl.dropbox.com/u/6599273/capa_wms2.png</a><br>
>><br>
>> Lo que sucede ahora con la petición, es
que se hace de manera<br>
>> incorrecta. Me cambia el epsg:3785 por
epsg:900913 (a pesar de que yo<br>
>> lo he especificado el 3785, como se puede
ver, y el servidor lo<br>
>> acepta). Y al cambiarlo, el servidor me
devuelve error. Aquí un<br>
>> ejemplo de las peticiones que genera en
este segundo caso, devolviendo<br>
>> error por el epsg:<br>
>><br>
>> <a moz-do-not-send="true"
href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1&LAYERS=catastro&FORMAT=image%2Fpng&SRS=EPSG%3A900913&TRANSPARENT=true&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-1721973.3737,3228700.0733875,-1702405.4944625,3248267.952625&WIDTH=256&HEIGHT=256"
target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1&LAYERS=catastro&FORMAT=image%2Fpng&SRS=EPSG%3A900913&TRANSPARENT=true&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-1721973.3737,3228700.0733875,-1702405.4944625,3248267.952625&WIDTH=256&HEIGHT=256</a><br>
>><br>
>> Resumiendo lo que pasa, cuando
transparent es 'false', la capa se<br>
>> interpreta como capa base, y la petición
se genera correctamente. Pero<br>
>> cuando transparent es 'true', la capa se
interpreta como overlay, que<br>
>> es lo que yo quiero, pero la petición se
hace de manera errónea,<br>
>> porque me cambia el epsg.<br>
>><br>
>> ¿Alguna pista de porqué pasa esto? Estoy
usando esta versión de<br>
>> OpenLayers directamente <a
moz-do-not-send="true"
href="http://openlayers.org/api/OpenLayers.js"
target="_blank">http://openlayers.org/api/OpenLayers.js</a><br>
>><br>
>> Muchas gracias por adelantado, un saludo<br>
>><br>
>><br>
><br>
> Mira a ver si esto[1] te vale
tocayo.Básicamente me he sacado de la<br>
> manga un parámetro reproject de este
ejemplo[3].<br>
><br>
> Pero cuidadín que ese parámetro esta
deprecated[3] y es más bien un<br>
> hack, debería haber una forma de conseguir
instanciar un mapa en 3785 y<br>
> que catastro funcione, si lo saco te aviso.<br>
><br>
> [1] <a moz-do-not-send="true"
href="http://pastebin.com/gSVFU1id"
target="_blank">http://pastebin.com/gSVFU1id</a><br>
> [2] <a moz-do-not-send="true"
href="http://openlayers.org/dev/examples/google-reproject.html"
target="_blank">http://openlayers.org/dev/examples/google-reproject.html</a><br>
> [3]<br>
> <a moz-do-not-send="true"
href="http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Layer/HTTPRequest-js.html#OpenLayers.Layer.HTTPRequest.reproject"
target="_blank">http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Layer/HTTPRequest-js.html#OpenLayers.Layer.HTTPRequest.reproject</a><br>
><br>
> --<br>
> Jorge Gaspar Sanz Salinas<br>
> <a moz-do-not-send="true"
href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
> <a moz-do-not-send="true"
href="http://jorgesanz.net" target="_blank">http://jorgesanz.net</a><br>
</blockquote>
</div>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Spanish mailing list
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/spanish" target="_blank">http://lists.osgeo.org/mailman/listinfo/spanish</a>
<a moz-do-not-send="true" href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a>
<a moz-do-not-send="true" href="http://twitter.com/osgeoes" target="_blank">http://twitter.com/osgeoes</a>
</pre>
</blockquote>
<br>
<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 2010
</a>
<br>
Registered Charity No. 1091222<br>
PML is a company limited by guarantee<br>
registered in England & Wales<br>
company number 4178503</font></p>
<p><font face="Arial" color="green" 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>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<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 href="http://www.pml.ac.uk">www.pml.ac.uk</a>
<br />
<a href="http://www.pml.ac.uk/pdf/PMLAR2010.pdf">Click here for PML Annual Review 2010 </a>
<br />
Registered Charity No. 1091222<br />
PML is a company limited by guarantee<br />
registered in England & Wales<br />
company number 4178503</font></p>
<p><font face="Arial" size="1" color="green">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 forinfo@pml.ac.uk 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 /></body>
</html>