<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV>Hi ,</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do the Following to get going with the Sample GT Application on MGOS2.1.0&nbsp; (API Change).</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.Query Task--Change the <STRONG><U>query.php</U></STRONG> File</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.Theme Task-No Change works perfectly ok</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.Markup Task-Change the <STRONG>markupeditor.php</STRONG> File</DIV>
<DIV>&nbsp;</DIV>
<DIV>-------------------------------------------------------------------------------------------------------</DIV>
<DIV>1.<STRONG> Change the<U> function Execute()</U> in the query.php file at</STRONG> C:\ProgramFiles\MapGuideOpenSource2.\WebServerExtensions\www\phpviewersample\query\classes <BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>function Execute()<BR>{<BR>&nbsp; $result = array();<BR>&nbsp; $resourceService =<BR>&nbsp;$this-&gt;site-&gt;CreateService(MgServiceType::ResourceService);<BR>&nbsp; $map = new MgMap();<BR>&nbsp; $map-&gt;Open($resourceService, $this-&gt;args['MAPNAME']);<BR>&nbsp;&nbsp;$layer = $map-&gt;GetLayers()-&gt;GetItem($this-&gt;args['LAYERNAME']);<BR>&nbsp; $featureService =<BR>&nbsp; $this-&gt;site-&gt;CreateService(MgServiceType::FeatureService);<BR>&nbsp; $resId = new MgResourceIdentifier($layer-&gt;GetFeatureSourceId());<BR>&nbsp; $featureClass = $layer-&gt;GetFeatureClassName();<BR>&nbsp; $featureGeometry = $layer-&gt;GetFeatureGeometryName();</DIV>
<DIV><BR>&nbsp; // Initialize the coordinate system transform<BR>&nbsp; $schemaAndClass = explode(":", $featureClass);<BR>&nbsp; $classDef = $featureService-&gt;GetClassDefinition($resId,<BR>&nbsp;$schemaAndClass[0], $schemaAndClass[1]);<BR>&nbsp; $geomProp = $classDef-&gt;GetProperties()-&gt;GetItem($featureGeometry);<BR>&nbsp; $spatialContext = $geomProp-&gt;GetSpatialContextAssociation();<BR>&nbsp; $csTransform = null;<BR>&nbsp; $csInverseTransform = null;<BR>&nbsp; $coordSysFactory = new MgCoordinateSystemFactory();<BR>&nbsp; $scReader = $featureService-&gt;GetSpatialContexts($resId, false);<BR>&nbsp; while ($scReader-&gt;ReadNext() &amp;&amp; $csTransform == null)<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; if ($scReader-&gt;GetName() == $spatialContext)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; $source =<BR>&nbsp;$coordSysFactory-&gt;Create($scReader-&gt;GetCoordinateSystemWkt());<BR>&nbsp;&nbsp;&nbsp; $target =
 $coordSysFactory-&gt;Create($map-&gt;GetMapSRS());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; <FONT color=#ff0000>$csTransform=$coordSysFactory-&gt;GetTransform($source, $target);<BR>&nbsp;&nbsp;&nbsp; $csInverseTransform=$coordSysFactory-&gt;GetTransform($target, $source);</FONT></DIV>
<DIV><FONT color=#ff0000><BR></FONT>&nbsp;&nbsp;&nbsp; //$csTransform = new MgCoordinateSystemTransform($source, $target);<BR>&nbsp;&nbsp;&nbsp; //$csInverseTransform = new MgCoordinateSystemTransform($target,&nbsp;$source);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; }<BR></DIV>
<DIV>------------------------------------------------------------------------------------------------</DIV>
<DIV><STRONG>3.&nbsp; Change function <U>GetTransform()</U> in the markupeditor.php file at</STRONG></DIV>
<DIV>C:\ProgramFiles\MapGuideOpenSource2.\WebServerExtensions\www\phpviewersample\markup\classes </DIV>
<DIV>&nbsp;</DIV>
<DIV>function GetTransform()<BR>&nbsp;{<BR>&nbsp; $coordSysFactory = new MgCoordinateSystemFactory();<BR>&nbsp; $resourceService =<BR>&nbsp;$this-&gt;site-&gt;CreateService(MgServiceType::ResourceService);<BR>&nbsp;&nbsp;<BR>&nbsp; $map = new MgMap();<BR>&nbsp; $map-&gt;Open($resourceService, $this-&gt;args['MAPNAME']);<BR>&nbsp;&nbsp;<BR>&nbsp; $source = $coordSysFactory-&gt;Create($map-&gt;GetMapSRS());&nbsp;<BR>&nbsp; $target = $coordSysFactory-&gt;Create(MarkupManager::LL84WKT);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; <FONT color=#ff0000>return $coordSysFactory-&gt;GetTransform($source, $target);&nbsp;</FONT></DIV>
<DIV><BR>&nbsp; // return new MgCoordinateSystemTransform($source, $target);<BR>&nbsp;&nbsp;&nbsp; }<BR><BR>-----------------------------------------------------------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>Cheers </DIV>
<DIV>Max !!</DIV><BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Jason Birch &lt;Jason.Birch@nanaimo.ca&gt;<BR>To: MapGuide Users Mail List &lt;mapguide-users@lists.osgeo.org&gt;<BR>Sent: Tuesday, June 3, 2008 11:52:21 AM<BR>Subject: RE: [mapguide-users] Shareable query<BR><BR>querycontroller.php is erroring out on you on the site you posted earier -- 127.0.0.1 didn't work for me :)<BR><BR>Anything in the apache error log, or in the php error log (assuming you have it enabled)?<BR><BR>Once you get this all working, it would be great to see a trac ticket describing what was wrong with the GT sample, and what you did to fix it:<BR><BR><A href="http://trac.osgeo.org/mapguide/wiki/SubmitTicket" target=_blank>http://trac.osgeo.org/mapguide/wiki/SubmitTicket</A> &lt;<A href="http://trac.osgeo.org/mapguide/wiki/SubmitTicket" target=_blank>http://trac.osgeo.org/mapguide/wiki/SubmitTicket</A>&gt;
 <BR><BR>Jason<BR><BR>________________________________<BR><BR>From: erictsn &lt;mailto:<A href="mailto:erictsn@cadbeyond.com" ymailto="mailto:erictsn@cadbeyond.com">erictsn@cadbeyond.com</A>&gt; <BR>Subject: [mapguide-users] Shareable query<BR><BR>Now I working on query functionality. It can't to query the result. DO you<BR>have idea? I have captured a sort of access.log file:<BR><BR><BR></DIV></DIV></div><br>



      </body></html>