[mapguide-users] Any coord. system to WGS84 (Google Earth). What's wrong?

Jose Manuel C G gis at mapas-sll.com
Tue Jul 24 06:43:41 EDT 2007


Sorry, but the Mapguide API is very difficult to my knowledge. Please any say
to me what's wrong or missing in this code snippet . I want to transform XY
from ED50 to WGS84. 

Thks to all. Here the code:

include '../mapviewerphp/constants.php';
include '../mapviewerphp/common.php';
    
    try{

		MgInitializeWebTier($configFilePath);

		$coordSys1="ED50";
		$coordSys2="WGS 84";
		$xArg = 664155.7;
		$yArg = 4128459.3;

		$csTransform12 = new MgCoordinateSystemTransform($coordSys1, $coordSys2);

        $coordinateArg = $geometryFactory->CreateCoordinateXY($xArg, $yArg);
        $coordinate12 = $csTransform12->Transform($coordinateArg);
        $x12 = $coordinate12->GetX();
        $y12 = $coordinate12->GetY();
        echo '$x12='.$x12.' | $y12='.$y12;

	}catch (MgException $e){

		echo "<p><strong>Error:</strong> ";
		echo $e->GetDetails();
		echo "</p>";

    }
-- 
View this message in context: http://www.nabble.com/Any-coord.-system-to-WGS84-%28Google-Earth%29-tf4085738s16610.html#a11760492
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list