<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"><P>Hi All,</P>
<P> </P>
<P> Finally i able to manage to get going with <STRONG>Dynamic query task</STRONG> , previously i did some online backup repositries as well as <STRONG>restore</STRONG> and all from MGOS 1.2 and was unable to select features using dynamic query ,but once i removed all the previous versions and installed the MGOS2.0.1 with some modifications in the <STRONG>query.php</STRONG> code as per my previous mail , i able to get going with my Windows Server2003+Php+Apache .</P>
<P> </P>
<P>Don give a try !!</P>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Cheers</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Max !!<BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Rahul <unicorn_admirer@yahoo.com><BR>To: MapGuide Users Mail List <mapguide-users@lists.osgeo.org><BR>Sent: Thursday, May 29, 2008 10:05:39 AM<BR>Subject: Re: [mapguide-users] Dynamic Query Task Fails in MGOS 2.0.1<BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<P>Hi Don,</P>
<P> Regarding the Dynamic query Task you can change the query.php file in the <U>D:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\www\phpviewersample\query\classes</U> as there is some change due to the RFC35 and have to use --></P>
<P> </P>
<P><EM>MgCoordinateSystemFactory::GetTransform should be used instead of the deleted MgCoordinateSystemTransform constructor,</EM></P>
<P> </P>
<P>So your code in the <STRONG>Function Execute</STRONG> will be --</P>
<P> </P>
<P>function Execute()<BR> {<BR> $result = array();</P>
<P> $resourceService = $this->site->CreateService(MgServiceType::ResourceService);</P>
<P> $map = new MgMap();<BR> $map->Open($resourceService, $this->args['MAPNAME']);<BR> $layer = $map->GetLayers()->GetItem($this->args['LAYERNAME']);</P>
<P> $featureService = $this->site->CreateService(MgServiceType::FeatureService);<BR> $resId = new MgResourceIdentifier($layer->GetFeatureSourceId());<BR> $featureClass = $layer->GetFeatureClassName();<BR> $featureGeometry = $layer->GetFeatureGeometryName();</P>
<P> // Initialize the coordinate system transform</P>
<P> $schemaAndClass = explode(":", $featureClass);<BR> $classDef = $featureService->GetClassDefinition($resId, $schemaAndClass[0], $schemaAndClass[1]);<BR> $geomProp = $classDef->GetProperties()->GetItem($featureGeometry);<BR> $spatialContext = $geomProp->GetSpatialContextAssociation();</P>
<P> $csTransform = null;<BR> $csInverseTransform = null;<BR> <EM>$coordSysFactory = new MgCoordinateSystemFactory();</EM></P>
<P> $scReader = $featureService->GetSpatialContexts($resId, false);<BR> while ($scReader->ReadNext() && $csTransform == null)<BR> {<BR> if ($scReader->GetName() == $spatialContext)<BR> {<BR> $source = $coordSysFactory->Create($scReader->GetCoordinateSystemWkt());<BR> $target = $coordSysFactory->Create($map->GetMapSRS());<BR> <BR> <STRONG>$csTransform=$coordSysFactory->GetTransform($source, $target);<BR> $csInverseTransform=$coordSysFactory->GetTransform($target, $source);</STRONG></P>
<P> //$csTransform = new MgCoordinateSystemTransform($source, $target);<BR> //$csInverseTransform = new MgCoordinateSystemTransform($target, $source);<BR> <BR> <BR> }<BR> }</P>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">This allow me to query and get the results but the stranged thing is happening that in one machine with <STRONG>(Windows XP+Apache+PHP)</STRONG> , I can query and select the results while in the other machine with <STRONG>Windows2003+Apache+Php</STRONG>, I can query but unable to select the features and use to get the error in the apache log file.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Uncaught exception 'mgobjectnotfoundexception' in Unknown on line 0, referer:<BR> <A href="http://10.0.x.xx:8008/mapguide/phpviewersample/query/querymain.php" target=_blank rel=nofollow><FONT color=#0000ff>http://10.0.x.xx:8008/mapguide/phpviewersample/query/querymain.php</FONT></A><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Anyway Don you can give a try and i hope it will work for you if u r using windows XP +Apache+Php..</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Max!!<BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Don C. MacGregor <sir_sunkee@yahoo.ca><BR>To: mapguide-users@lists.osgeo.org<BR>Sent: Wednesday, May 28, 2008 9:08:52 PM<BR>Subject: Re: [mapguide-users] Dynamic Query Task Fails in MGOS 2.0.1<BR><BR><BR>Hi Max,<BR>I was too busy to research so I restored my MGOS 1.2 installation.<BR><BR><BR>max_samart wrote:<BR>> <BR>> Hi All,<BR>> Finally I able to manage toperform search and get results using<BR>> the phpviewersample Query Task after changing few lines of codes from the<BR>> original one, but once i use the Select Button ,it doesn't use to select<BR>> feature and in the Apache Error.log file use to give the following error.<BR>> -------------------------------------------------------------------------------------------------------<BR>> [Wed May 28 16:45:06 2008]
[error] [client 10.0.x.xx] PHP Fatal error: <BR>> Uncaught exception 'mgobjectnotfoundexception' in Unknown on line 0,<BR>> referer:<BR>> <A href="http://10.0.x.xx:8008/mapguide/phpviewersample/query/querymain.php" target=_blank rel=nofollow>http://10.0.x.xx:8008/mapguide/phpviewersample/query/querymain.php</A><BR>> --------------------------------------------------------------------------------------------------------<BR>> <BR>> Can anybody tell me how to move forward or can give any kind of idea for<BR>> the possible cause of error.Hey Don have you got going with your custom<BR>> scripts in MGOS2.0.1 ,which was previously working with MGOS1.2.<BR>> Thks<BR>> Max !!<BR>> <BR>> ----- Original Message ----<BR>> From: Rahul <<A href="mailto:unicorn_admirer@yahoo.com" target=_blank rel=nofollow ymailto="mailto:unicorn_admirer@yahoo.com">unicorn_admirer@yahoo.com</A>><BR>> To: MapGuide Users Mail List <<A
href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>><BR>> Sent: Tuesday, May 27, 2008 10:23:57 AM<BR>> Subject: [mapguide-users] Dynamic Query Task Fails in MGOS 2.0.1<BR>> <BR>> <BR>> Hi All,<BR>> I downloaded theMGOS 2.0.1 and tried with the sample<BR>> data-Shebogyan.mgp with the supplied phpviewersample for MGOS2.0.1 ,but<BR>> I unable to perform the query task on the sample data.I am using Win2K3,<BR>> Apache and PHP. Can anybody confirm about this or its just happening on my<BR>> setup or i am missing something/configured something wrong.<BR>> <BR>> Thks<BR>> Max<BR>> <BR>> <BR>> <BR>> _______________________________________________<BR>> mapguide-users mailing list<BR>> <A
href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A><BR>> <A href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A><BR>> <BR>> <BR><BR>-- <BR>View this message in context: <A href="http://www.nabble.com/Dynamic-Query-Task-Fails-in-MGOS-2.0.1-tp17482346p17513475.html" target=_blank rel=nofollow>http://www.nabble.com/Dynamic-Query-Task-Fails-in-MGOS-2.0.1-tp17482346p17513475.html</A><BR>Sent from the MapGuide Users mailing list archive at <A href="http://nabble.com/" target=_blank rel=nofollow>Nabble.com</A>.<BR><BR>_______________________________________________<BR>mapguide-users mailing list<BR><A href="mailto:mapguide-users@lists.osgeo.org" target=_blank rel=nofollow
ymailto="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A><BR><A href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target=_blank rel=nofollow>http://lists.osgeo.org/mailman/listinfo/mapguide-users</A><BR></DIV></DIV><BR></DIV></div><br>
</body></html>