[Users] How to change projection of a baselayer...
Matt Priour
mpriour at kestrelcomputer.com
Thu Oct 13 19:20:34 CEST 2011
Are your WMS baselayers configured either in Mapproxy or in Mapserver to be available in mercator?
Also, if your mapserver wms service uses ‘EPSG:3857’ rather than ‘EPSG:900913’ as the web mercator projection code, then you should use that in your application.
Matt Priour
Kestrel Computer Consulting
From: Kai Volland
Sent: Thursday, October 13, 2011 10:15 AM
To: users at geoext.org
Subject: [Users] How to change projection of a baselayer...
Hi Users,
i have 3 diffrent Baselayers: 1. Google, 2. WMSa, 3. WMSb. The
WMS-Baselayers come from mapserver and are cached by mapproxy.
I know need to change the projection of the Baselayer 2 & 3 from
EPSG:4326 to EPSG:900913, so that my WFS-Features don't have to be
reprojected and the View don't has to be changed when switching the
baselayer.
GOOGLE LAYER:
var mercator = new OpenLayers.Projection("EPSG:900913");
var WGS84 = new OpenLayers.Projection("EPSG:4326");
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{
type: google.maps.MapTypeId.TERRAIN
}
);
WMS LAYER:
var mapquest1 = new OpenLayers.Layer.WMS(
"MapQuest Aerial",
"xxx.de/mapproxy/service",
{
projection: mercator, // DOESN'T WORK
layers: 'MapQuestAerial',
transparent: true,
format: 'image/png'
},
{
isBaseLayer: true,
hideInLegend: true
}
);
Kind regards
Kai
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111013/9f6d6bf1/attachment.htm
More information about the Users
mailing list