Working with Coordinate Systems

The following sample shows how to set a Coordinate System to be used by a client. It uses the ICoordSys::GetTerrainCS() method to retrieve the MPT coordinate system

 

<HTML>

<b>Coordinate System Sample</b></br>

This sample shows how to set the Coordinate System to be used by this client.</br>

 

<SCRIPT Language="VBSCRIPT">

Dim ICoordSys

 

sub SetCoordinateSystem()

Set ICoordSys = TE.interface("ICoordSys")

'Get Terrain Coordinate System keys, to be used as start parameters for the Dialog.

ICoordSys.GetTerrainCS Group, System, Datum, Unit, EPGS

ICoordSys.ChooseCSDialog chosen, Group, System, Datum, Unit, EPGS, 0, "Choose Client Coordinate System"

if (chosen) then

   ICoordSys.SetSourceCS Group, System, Datum, Unit, EPGS

else

   SetCoordinateSystem()

end if

end sub

</SCRIPT>

 

<INPUT type=button value="Set Coordinate System" name="Set Coordinate System" onclick="SetCoordinateSystem()"></br>

 

<BODY>

<OBJECT ID="TE" CLASSID="CLSID:3a4f9191-65a8-11d5-85c1-0001023952c1"></OBJECT>

</BODY>

 

</HTML>