[OpenLayers-Users] YNT: Problem with Google Maps and WMS layer

Mehmet Erdogdu merdogdu at turksat.com.tr
Tue Oct 27 05:00:47 EDT 2009


You got to change your wms projection to epsg:900913

Otherwise it wont work

King Regards,

FourLeaf Contractor - http://www.fourleafcontractor.com

Mehmet Erdoğdu
Kidemli Uzman / Senior Specialist
Cografi Bilgi Teknolojileri Mudurlugu / Department of Geographical Information Technologies

TÜRKSAT Uydu Haberlesme   Kablo   TV  ve   Isletme  A.S.
Satellite Communication Cable TV and Operation Corp., Inc.
Cevizlidere Cad. No: 31 Balgat - ANKARA / TURKIYE
Te l :  +90 312 583 20 53    Faks : +90 312 583 20 79

32.818439 E 39.888139 N<http://arsiv.turksat.com.tr/exchweb/bin/redir.asp?URL=http://maps.google.com/maps/ms?msa=0%26msid=101926461308053995071.000001131650803fd7963%26hl=tr%26ie=UTF8%26ll=39.888439,32.818496%26spn=0.002054,0.004828%26t=h%26z=18>
________________________________
Kimden: users-bounces at openlayers.org [users-bounces at openlayers.org], Sune Dogan, LIFA A/S [sud at LIFA.DK] Adına
Tarih: 27 Ekim 2009 Salı 09:08
Kime: Andre Pereira de Matos; users at openlayers.org
Konu: Re: [OpenLayers-Users] Problem with Google Maps and WMS layer

Thank You, but its not workin for me.

Im doing the following:

            function init() {

                var options = {
                    projection: new OpenLayers.Projection("EPSG:900913"),
                    displayProjection: new OpenLayers.Projection("EPSG:25832"),
                    units: "m",
                    maxResolution: 156543.0339,
                    maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,20037508.34, 20037508.34)
                };

                map = new OpenLayers.Map('map', options);

                var gmap = new OpenLayers.Layer.Google("Google", { sphericalMercator: true });



      var pdkWMS =  new OpenLayers.Layer.WMS(
            "Kommuneplanrammer",
            "http://kort.plansystem.dk/wms?servicename=wms&SRS=EPSG:25832&REQUEST=GetMap&exceptions=application/vnd.ogc.se_xml",
            {
                layers: 'theme-pdk-kommuneplanramme-vedtaget',
                format: 'image/png',
                transparent: 'true',
                ignoreillegallayers: 'true',
                projection: map.displayProjection,
                strategies: [new OpenLayers.Strategy.Fixed()]

            },
             {
                 isBaseLayer: false,
                 displayInLayerSwitcher: true
             }
        );

             map.addLayers([gmap, pdkWMS]);
             map.addControl(new OpenLayers.Control.LayerSwitcher({ 'ascending': false }));
             map.zoomToExtent(new OpenLayers.Bounds(68.774414, 11.381836, 123.662109, 34.628906).transform(map.displayProjection, map.projection));

            }

Any sugestions what to do?

Thanks in advance.

Fra: Andre Pereira de Matos [mailto:andre.matos at co.sapo.pt]
Sendt: 26. oktober 2009 15:07
Til: Sune Dogan, LIFA A/S; users at openlayers.org
Emne: RE: Problem with Google Maps and WMS layer

Hi,

Yes, it is possible, using OpenLayers. Openlayers can reproject a layer in a different coordinate system.

I think this example can help you. This example uses a Open Street Maps layer a Google maps layer and a KML layer.
http://openlayers.org/dev/examples/sundials-spherical-mercator.html

To display a single Google layer check this example:
http://openlayers.org/dev/examples/google.html


You can find out more examples here:
http://openlayers.org/dev/examples/

Good luck!

André Matos
SAPO Mapas – http://mapas.sapo.pt



From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On Behalf Of Sune Dogan, LIFA A/S
Sent: segunda-feira, 26 de Outubro de 2009 13:41
To: users at openlayers.org
Subject: [OpenLayers-Users] Problem with Google Maps and WMS layer

Hello

Is it possible to have Google Maps as a baselayer and a WMS service as overlay. Is there any working examples with that?

My WMS has projection: EPSG:25832


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091027/c0802ebc/attachment.html


More information about the Users mailing list