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.
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to