Buenas, Genial, ya funciona. Muchas gracias por la respuesta, era exactamente eso. En cuanto al pop-up de copyright de las imágenes de Google, he probado esto, pero por ahora no funciona...
http://getsatisfaction.com/opengeo/topics/how_to_get_rid_of_goggle_layers_map_data_windows ¡Muchas gracias otra vez! Voy a contestar en stackexchange... 2011/6/13 Jorge de Jesus <[email protected]>: > Gracias por el "force Openlayers to use that EPSG code instead", :-) > > Jorge > > On 13/06/11 09:33, Ragi Burhum wrote: > > Hola a todos, > > Aquí les ago un copy/paste del mensaje: > > "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, crschmidt's blog post will give you a clue... > > Ian pointed out the relevant OpenLayer's documentation section to force > OpenLayers to use that EPSG code instead. > > 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." > > 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). > > Saludos, > > - Ragi > > 2011/6/13 Jorge de Jesus <[email protected]> >> >> Hola a todos (Jorge y Jorge et al.) >> >> Ayer estava mirando al libro de OpenLayers2.10, y dicia muy claro: >> >> "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.) >> >> Tu servidor WMS tiene que suportar el EPSG:900913, y OpenLayers solo va a >> trabajar con este proyectado. >> >> Y por el pop up de map data, tienes que anadir el seguinte CSS: >> >> .olLayerGoogleCopyright { >> visibility:hidden; >> } >> >> >> o entonces algo como top:-10000px; >> >> Jorge >> >> On 12/06/11 19:03, Ragi Burhum wrote: >> >> Jorge y Jorge :) >> Ya puse una respuesta a esta pregunta en >> GIS.SE http://gis.stackexchange.com/questions/10916/openlayers-weird-problem-with-googlemaps-base-layer-and-wms-overlay/10920#10920 >> Inclusive, uno de los creadores de Openlayers le dió un +1 a la respuesta, >> así que pueden estar seguros que es la correcta. :) >> Saludos, >> - Ragi >> >>> >>> Message: 1 >>> Date: Sun, 12 Jun 2011 16:41:29 +0200 >>> From: Jorge Ar?valo <[email protected]> >>> Subject: Re: [Spanish] WMS Catastro + OpenLayers >>> To: "Cap&, amp, amp, #237, tulo Local de la comunidad >>> hispano-hablante" <[email protected]> >>> Message-ID: <[email protected]> >>> Content-Type: text/plain; charset=ISO-8859-1 >>> >>> Buenas, >>> >>> Muchas gracias crack. La pena es que no me ha funcionado :-(. He >>> probado también a usar la versión estable de OpenLayers >>> http://openlayers.org/api/OpenLayers.js, en lugar de la versión en >>> desarrollo, y me dice lo mismo. >>> >>> Otra cosa algo molesta es que siempre me sale un popup con el >>> copyright de TeleAtlas. Pero bueno, es un problema menor. Si conseguis >>> poner el WMS del catastro sobre una capa de GoogleMaps en OpenLayers, >>> me haréis un gran favor. Ya digo que con la API de Google Maps >>> directamente ha sido sencillo. >>> >>> Muchas gracias en cualquier caso :-) >>> >>> Jorge >>> >>> 2011/6/12 Jorge Gaspar Sanz Salinas <[email protected]>: >>> > El 11/06/2011 17:41, Jorge Arévalo escribió: >>> >> Buenas, >>> >> >>> >> Estoy intentando superponer una capa del WMS del catastro sobre una >>> >> capa base de GoogleMaps en OpenLayers. Usando la API de GoogleMaps lo >>> >> hice sin problemas, aprovechando que el WMS del catastro ofrece el >>> >> EPSG:3785, pero al intentarlo en OpenLayers me está pasando una cosa >>> >> rara. Me explico: >>> >> >>> >> Si la capa la defino así en OpenLayers >>> >> >>> >> var catastro_layer = new OpenLayers.Layer.WMS( >>> >> "WMS Catastro", >>> >> >>> >> "http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1", >>> >> { >>> >> layers: "catastro", >>> >> format:"image/png", >>> >> srs: "EPSG:3785", >>> >> transparent: false >>> >> } >>> >> ); >>> >> >>> >> Me aparece la capa WMS como una capa más, elegible en lugar de la de >>> >> Google, pero NO superponible sobre ella. En esta captura se ve lo que >>> >> quiero decir: http://dl.dropbox.com/u/6599273/capa_wms1.png >>> >> >>> >> En este caso, la petición WMS se genera correctamente. Aquí un >>> >> ejemplo: >>> >> >>> >> >>> >> 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 >>> >> >>> >> Pero no me vale porque yo quiero la capa WMS encima de la de Google >>> >> Maps, no en lugar de ella. >>> >> >>> >> En cambio, si defino la capa así (solo he cambiado el transparent de >>> >> false a true): >>> >> >>> >> var catastro_layer = new OpenLayers.Layer.WMS( >>> >> "WMS Catastro", >>> >> >>> >> "http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?SERVICE=WMS&VERSION=1.1.1", >>> >> { >>> >> layers: "catastro", >>> >> format:"image/png", >>> >> srs: "EPSG:3785", >>> >> transparent: true >>> >> } >>> >> ); >>> >> >>> >> La capa WMS ya aparece como una capa superpuesta sobre la capa base >>> >> (como si hubiera especificado "isBaseLayer:false", aunque no lo he >>> >> hecho). En la captura se ve: >>> >> http://dl.dropbox.com/u/6599273/capa_wms2.png >>> >> >>> >> Lo que sucede ahora con la petición, es que se hace de manera >>> >> incorrecta. Me cambia el epsg:3785 por epsg:900913 (a pesar de que yo >>> >> lo he especificado el 3785, como se puede ver, y el servidor lo >>> >> acepta). Y al cambiarlo, el servidor me devuelve error. Aquí un >>> >> ejemplo de las peticiones que genera en este segundo caso, devolviendo >>> >> error por el epsg: >>> >> >>> >> >>> >> 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 >>> >> >>> >> Resumiendo lo que pasa, cuando transparent es 'false', la capa se >>> >> interpreta como capa base, y la petición se genera correctamente. Pero >>> >> cuando transparent es 'true', la capa se interpreta como overlay, que >>> >> es lo que yo quiero, pero la petición se hace de manera errónea, >>> >> porque me cambia el epsg. >>> >> >>> >> ¿Alguna pista de porqué pasa esto? Estoy usando esta versión de >>> >> OpenLayers directamente http://openlayers.org/api/OpenLayers.js >>> >> >>> >> Muchas gracias por adelantado, un saludo >>> >> >>> >> >>> > >>> > Mira a ver si esto[1] te vale tocayo.Básicamente me he sacado de la >>> > manga un parámetro reproject de este ejemplo[3]. >>> > >>> > Pero cuidadín que ese parámetro esta deprecated[3] y es más bien un >>> > hack, debería haber una forma de conseguir instanciar un mapa en 3785 y >>> > que catastro funcione, si lo saco te aviso. >>> > >>> > [1] http://pastebin.com/gSVFU1id >>> > [2] http://openlayers.org/dev/examples/google-reproject.html >>> > [3] >>> > >>> > http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Layer/HTTPRequest-js.html#OpenLayers.Layer.HTTPRequest.reproject >>> > >>> > -- >>> > Jorge Gaspar Sanz Salinas >>> > http://es.osgeo.org >>> > http://jorgesanz.net >> >> _______________________________________________ >> Spanish mailing list >> http://lists.osgeo.org/mailman/listinfo/spanish >> http://es.osgeo.org >> http://twitter.com/osgeoes >> >> >> ________________________________ >> >> Plymouth Marine Laboratory >> Registered Office: >> Prospect Place >> The Hoe >> Plymouth PL1 3DH >> >> Website: www.pml.ac.uk >> Click here for PML Annual Review 2010 >> Registered Charity No. 1091222 >> PML is a company limited by guarantee >> registered in England & Wales >> company number 4178503 >> >> Please think before you print. >> >> ________________________________ >> >> This e-mail, its content and any file attachments are confidential. >> >> 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 [email protected] and >> then delete the email without making any copies or using it in any other >> way. >> >> The content of this message may contain personal views which are not the >> views of Plymouth Marine Laboratory unless specifically stated. >> >> 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. >> >> ________________________________ >> > > > > ________________________________ > > Plymouth Marine Laboratory > Registered Office: > Prospect Place > The Hoe > Plymouth PL1 3DH > > Website: www.pml.ac.uk > Click here for PML Annual Review 2010 > Registered Charity No. 1091222 > PML is a company limited by guarantee > registered in England & Wales > company number 4178503 > > Please think before you print. > > ________________________________ > > This e-mail, its content and any file attachments are confidential. > > 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 [email protected] and then > delete the email without making any copies or using it in any other way. > > The content of this message may contain personal views which are not the > views of Plymouth Marine Laboratory unless specifically stated. > > 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. > > ________________________________ > > > _______________________________________________ > Spanish mailing list > http://lists.osgeo.org/mailman/listinfo/spanish > http://es.osgeo.org > http://twitter.com/osgeoes > > -- Jorge Arévalo Internet & Mobility Division, DEIMOS [email protected] http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g _______________________________________________ Spanish mailing list http://lists.osgeo.org/mailman/listinfo/spanish http://es.osgeo.org http://twitter.com/osgeoes
