<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Hola lista,<br><br>Pregunta "capciosa"....saben que servidor de mapas utiliza OSM?????<br><br>gracias<br><br>Gustavo<br><br><div><hr id="stopSpelling">Date: Sun, 12 Jun 2011 11:03:59 -0700<br>From: ragi@burhum.com<br>To: spanish@lists.osgeo.org<br>Subject: [Spanish] Re: WMS Catastro + OpenLayers (Jorge Ar?valo)<br><br><div class="ecxgmail_quote"><div>Jorge y Jorge :)</div><div><br></div><div>Ya puse una respuesta a esta pregunta en <a href="http://GIS.SE" target="_blank">GIS.SE</a>&nbsp;<a 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>
&nbsp;</div><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">Message: 1<br>
Date: Sun, 12 Jun 2011 16:41:29 +0200<br>
From: Jorge Ar?valo &lt;<a href="mailto:jorge.arevalo@deimos-space.com">jorge.arevalo@deimos-space.com</a>&gt;<br>
Subject: Re: [Spanish] WMS Catastro + OpenLayers<br>
To: "Cap&amp;amp, amp, amp, #237, &nbsp; tulo Local de la comunidad<br>
 &nbsp; &nbsp; &nbsp; &nbsp;hispano-hablante" &lt;<a href="mailto:spanish@lists.osgeo.org">spanish@lists.osgeo.org</a>&gt;<br>
Message-ID: &lt;BANLkTi=<a href="mailto:2c9hYjsidC3vEPtg19Fm4WvQLtQ@mail.gmail.com">2c9hYjsidC3vEPtg19Fm4WvQLtQ@mail.gmail.com</a>&gt;<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 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 &lt;<a href="mailto:jsanz@osgeo.org">jsanz@osgeo.org</a>&gt;:<br>
&gt; El 11/06/2011 17:41, Jorge Arévalo escribió:<br>
&gt;&gt; Buenas,<br>
&gt;&gt;<br>
&gt;&gt; Estoy intentando superponer una capa del WMS del catastro sobre una<br>
&gt;&gt; capa base de GoogleMaps en OpenLayers. Usando la API de GoogleMaps lo<br>
&gt;&gt; hice sin problemas, aprovechando que el WMS del catastro ofrece el<br>
&gt;&gt; EPSG:3785, pero al intentarlo en OpenLayers me está pasando una cosa<br>
&gt;&gt; rara. Me explico:<br>
&gt;&gt;<br>
&gt;&gt; Si la capa la defino así en OpenLayers<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; var catastro_layer = new OpenLayers.Layer.WMS(<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "WMS Catastro",<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "<a href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&amp;VERSION=1.1.1" target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&amp;VERSION=1.1.1</a>",<br>

&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; layers: "catastro",<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; format:"image/png",<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; srs: "EPSG:3785",<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transparent: false<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; );<br>
&gt;&gt;<br>
&gt;&gt; Me aparece la capa WMS como una capa más, elegible en lugar de la de<br>
&gt;&gt; Google, pero NO superponible sobre ella. En esta captura se ve lo que<br>
&gt;&gt; quiero decir: <a href="http://dl.dropbox.com/u/6599273/capa_wms1.png" target="_blank">http://dl.dropbox.com/u/6599273/capa_wms1.png</a><br>
&gt;&gt;<br>
&gt;&gt; En este caso, la petición WMS se genera correctamente. Aquí un ejemplo:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&amp;VERSION=1.1.1&amp;LAYERS=catastro&amp;FORMAT=image/png&amp;SRS=EPSG:3785&amp;TRANSPARENT=false&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application/vnd.ogc.se_inimage&amp;BBOX=-1721973.3737,3228700.0733875,-1702405.4944625,3248267.952625&amp;WIDTH=256&amp;HEIGHT=256" target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&amp;VERSION=1.1.1&amp;LAYERS=catastro&amp;FORMAT=image%2Fpng&amp;SRS=EPSG%3A3785&amp;TRANSPARENT=false&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_inimage&amp;BBOX=-1721973.3737,3228700.0733875,-1702405.4944625,3248267.952625&amp;WIDTH=256&amp;HEIGHT=256</a><br>

&gt;&gt;<br>
&gt;&gt; Pero no me vale porque yo quiero la capa WMS encima de la de Google<br>
&gt;&gt; Maps, no en lugar de ella.<br>
&gt;&gt;<br>
&gt;&gt; En cambio, si defino la capa así (solo he cambiado el transparent de<br>
&gt;&gt; false a true):<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; var catastro_layer = new OpenLayers.Layer.WMS(<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "WMS Catastro",<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "<a href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&amp;VERSION=1.1.1" target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&amp;VERSION=1.1.1</a>",<br>

&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; layers: "catastro",<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; format:"image/png",<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; srs: "EPSG:3785",<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transparent: true<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt;&gt; &nbsp; &nbsp; &nbsp; );<br>
&gt;&gt;<br>
&gt;&gt; La capa WMS ya aparece como una capa superpuesta sobre la capa base<br>
&gt;&gt; (como si hubiera especificado "isBaseLayer:false", aunque no lo he<br>
&gt;&gt; hecho). En la captura se ve:<br>
&gt;&gt; <a href="http://dl.dropbox.com/u/6599273/capa_wms2.png" target="_blank">http://dl.dropbox.com/u/6599273/capa_wms2.png</a><br>
&gt;&gt;<br>
&gt;&gt; Lo que sucede ahora con la petición, es que se hace de manera<br>
&gt;&gt; incorrecta. Me cambia el epsg:3785 por epsg:900913 (a pesar de que yo<br>
&gt;&gt; lo he especificado el 3785, como se puede ver, y el servidor lo<br>
&gt;&gt; acepta). Y al cambiarlo, el servidor me devuelve error. Aquí un<br>
&gt;&gt; ejemplo de las peticiones que genera en este segundo caso, devolviendo<br>
&gt;&gt; error por el epsg:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&amp;VERSION=1.1.1&amp;LAYERS=catastro&amp;FORMAT=image/png&amp;SRS=EPSG:900913&amp;TRANSPARENT=true&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application/vnd.ogc.se_inimage&amp;BBOX=-1721973.3737,3228700.0733875,-1702405.4944625,3248267.952625&amp;WIDTH=256&amp;HEIGHT=256" target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&amp;VERSION=1.1.1&amp;LAYERS=catastro&amp;FORMAT=image%2Fpng&amp;SRS=EPSG%3A900913&amp;TRANSPARENT=true&amp;REQUEST=GetMap&amp;STYLES=&amp;EXCEPTIONS=application%2Fvnd.ogc.se_inimage&amp;BBOX=-1721973.3737,3228700.0733875,-1702405.4944625,3248267.952625&amp;WIDTH=256&amp;HEIGHT=256</a><br>

&gt;&gt;<br>
&gt;&gt; Resumiendo lo que pasa, cuando transparent es 'false', la capa se<br>
&gt;&gt; interpreta como capa base, y la petición se genera correctamente. Pero<br>
&gt;&gt; cuando transparent es 'true', la capa se interpreta como overlay, que<br>
&gt;&gt; es lo que yo quiero, pero la petición se hace de manera errónea,<br>
&gt;&gt; porque me cambia el epsg.<br>
&gt;&gt;<br>
&gt;&gt; ¿Alguna pista de porqué pasa esto? Estoy usando esta versión de<br>
&gt;&gt; OpenLayers directamente <a href="http://openlayers.org/api/OpenLayers.js" target="_blank">http://openlayers.org/api/OpenLayers.js</a><br>
&gt;&gt;<br>
&gt;&gt; Muchas gracias por adelantado, un saludo<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; Mira a ver si esto[1] te vale tocayo.Básicamente me he sacado de la<br>
&gt; manga un parámetro reproject de este ejemplo[3].<br>
&gt;<br>
&gt; Pero cuidadín que ese parámetro esta deprecated[3] y es más bien un<br>
&gt; hack, debería haber una forma de conseguir instanciar un mapa en 3785 y<br>
&gt; que catastro funcione, si lo saco te aviso.<br>
&gt;<br>
&gt; [1] <a href="http://pastebin.com/gSVFU1id" target="_blank">http://pastebin.com/gSVFU1id</a><br>
&gt; [2] <a href="http://openlayers.org/dev/examples/google-reproject.html" target="_blank">http://openlayers.org/dev/examples/google-reproject.html</a><br>
&gt; [3]<br>
&gt; <a 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>

&gt;<br>
&gt; --<br>
&gt; Jorge Gaspar Sanz Salinas<br>
&gt; <a href="http://es.osgeo.org" target="_blank">http://es.osgeo.org</a><br>
&gt; <a href="http://jorgesanz.net" target="_blank">http://jorgesanz.net</a><br></blockquote></div>
<br>_______________________________________________
Spanish mailing list
http://lists.osgeo.org/mailman/listinfo/spanish
http://es.osgeo.org
http://twitter.com/osgeoes</div>                                               </div></body>
</html>