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:[email protected]]
Sendt: 26. oktober 2009 15:07
Til: Sune Dogan, LIFA A/S; [email protected]
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 <http://mapas.sapo.pt>
From: [email protected] [mailto:[email protected]] On
Behalf Of Sune Dogan, LIFA A/S
Sent: segunda-feira, 26 de Outubro de 2009 13:41
To: [email protected]
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
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users