Google Projection in MapGuide 2010
So to line up Google Maps on top of my data, I need to use the Spherical Mercator.
Ok, so how do I do that? Took a little digging but this is how:
1. Get the Projection Definition:
PROJCS["Popular Visualisation CRS / Mercator", GEOGCS["Popular Visualisation CRS", DATUM["Popular Visualisation Datum", SPHEROID["Popular Visualisation Sphere", 6378137, 0, AUTHORITY["EPSG",7059]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY["EPSG",6055]], PRIMEM["Greenwich", 0, AUTHORITY["EPSG", "8901"]], UNIT["degree", 0.0174532925199433, AUTHORITY["EPSG", "9102"]], AXIS["E", EAST], AXIS["N", NORTH], AUTHORITY["EPSG",4055]], PROJECTION["Mercator"], PARAMETER["False_Easting", 0], PARAMETER["False_Northing", 0], PARAMETER["Central_Meridian", 0], PARAMETER["Latitude_of_origin", 0], UNIT["metre", 1, AUTHORITY["EPSG", "9001"]], AXIS["East", EAST], AXIS["North", NORTH], AUTHORITY["EPSG",3785]]
2. Get the Map definition that you are using by logging into the http://server/mapguide2010/mapagent site
- Click the GetRecourseContentFor Resource ID, put in the full MapGuide Resource ID of your map: Library://Sheboygan/Maps/CITY.MapDefinition
3. Next save the XML to a file.
- Then modify the tag with the coordinate system in above.
4. Next click SETRESOURCE
For resource ID, use the same one: Library://Sheboygan/Maps/CITY.MapDefinition
For the Content, browse to your new XML file.
Click Submit.
5. You now have an updated map with the correct coordinate system …this works for any coordinate system you need in MapGuide.
August 14, 2009 at 4:48 pm
Have you made any changes to the default templates?
August 27, 2009 at 12:02 am
Yes, I just used some OpenLayers code to add the default baselayer (google).