[mapguide-users] OnPointDigitized and GetTransform

Jackie Ng jumpinjackie at gmail.com
Tue Feb 3 00:49:21 EST 2009

GetTransform() requires two MgCoordinateSystem objects. These are created
from the MgCoordinateSystemFactory, which you have to pass in wkt strings of
the coordinate systems.

So you need 2 wkt strings:

1) The map's coordinate system (The GetMapSRS() method of MgMap will return
this string)
2) The WGS84 coordinate system (You'll have to find this string yourself)

Then with the MgCoordinateSystemTransform object obtained from
GetTransform(), call Transform() passing in your digitized points, which
will then return the transformed points (in WGS84)

- Jackie

Steve G wrote:
> I am trying to create a tool in the task pane where you click a button and
> then click on the map which will get the x, y coordinates and open in
> google maps.  I have found the sample onpointdigitized php example and
> copied the code and it works pretty well to get the x, y coordinates.  The
> next step is that my map is in state plane california III (feet)
> projection, so the map units (feet) do not correlate to google maps
> (WGS84, decimal degrees).  I know there is the GetTransform()  function,
> but I haven't been able to figure out how to implement the code (put it
> all together with the onpointdigitized).  I was wondering if anyone could
> provide some help.  It's basically joining the two together and then
> sending the code to google maps (I already got an API key).  
> Any help would greatly be appreciated (I am more of a GIS user than
> programmer)!
> Thanks,
> -Steve

View this message in context: http://n2.nabble.com/OnPointDigitized-and-GetTransform-tp2261216p2261890.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list