[mapguide-users] Re: problem when using same code for MapGuideEnterprise2009 with MapGuideEnterprise2010

ehsan ehsan85 at yahoo.com
Tue Feb 2 22:33:41 EST 2010


Hi,

This is my php code :
/*Query the value */
$opts = new MgFeatureQueryOptions();
$opts->SetFilter("(NO_LOT ='".$searchValue."') AND
(KOD_DAERAH='".$daerah."') AND (NAMA_MUKIM='".$mukim."')");//set the query
filter
$featureClassName = $layer->GetFeatureClassName();
$srcId = new MgResourceIdentifier($layer->GetFeatureSourceId());
$features = $featureSrvc->SelectFeatures($srcId, $featureClassName, $opts);
$hasResult = $features->ReadNext();

/* Set Selection to the map  */
$featureClassName = $layer->GetFeatureClassName();
$srcId = new MgResourceIdentifier($layer->GetFeatureSourceId());
$features2 = $featureSrvc->SelectFeatures($srcId, $featureClassName, $opts);
$selection = new MgSelection($map);
$selection->AddFeatures($layer, $features2, 0);
$selectionXml = $selection->ToXml();

this is javascript function onPageLoad.
function OnPageLoad()
	{
	selectionXml = '<?php echo $selectionXml; ?>';
	parent.parent.SetSelectionXML(selectionXml);//set selection..
	parent.parent.ExecuteMapAction(10);//zoom to selection..
	}

this code i create to search for NOLOT,Select the area and zoom to
selection.

Thanks
-- 
View this message in context: http://n2.nabble.com/problem-when-using-same-code-for-MapGuideEnterprise2009-with-MapGuideEnterprise2010-tp4492918p4505379.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list