[mapguide-users] How do I set the right projection in OL for OSM?

frieda ruslankutowoj at web.de
Mon Jan 27 02:19:20 PST 2020


Hello,

I'm using the Kaliopa Mobile Viewer to display my MapGuide map and it works
great so far but now I would like to add Open Street Map as BaseLayer but my
map is always placed somewhere in the black sea.

I know I have to set the right projection in Openlayers but how?

In Maestro I can see the following information about the Coordinate System
of my Map.

PROJCS["DHDN.Gauss3d-3",GEOGCS["DHDN.LL",DATUM["DHDN",SPHEROID["BESSEL",6377397.155,299.15281535],TOWGS84[582.0000,105.0000,414.0000,-1.040000,-0.350000,3.080000,8.30000000]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",3500000.000],PARAMETER["false_northing",0.000],PARAMETER["scale_factor",1.000000000000],PARAMETER["central_meridian",9.00000000000000],PARAMETER["latitude_of_origin",0.00000000000000],UNIT["Meter",1.00000000000000]]

If I understand this correctly, then I get EPSG:4326, because I see
"TOWGS84" in that string, right? But OSM works with EPSG: 3857. So I tried
the following openlayers map Option:

projection: "EPSG:4326",
displayProjection: "EPSG:3857"

But this does not do anything, my map is still in the black sea.
Could someone give me a hint?

I'm working with OpenLayers 2 and MapGuide Server 2.5.2




--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html


More information about the mapguide-users mailing list