Hi,
you have to create selection object on the server side and then send it as an XML to the viewer Here is part of the code (in php) that I have used - taken mostly from developers guide and samples. You can find everything there. It is not .net, but I think you can get the idea

<?php
......
       $selection = new MgSelection($map);
       $queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetFilter("...."); -> Your parcel id should be used in setting $queryOptions
       $featureReader = $layer->SelectFeatures($queryOptions);
       $selection->AddFeatures($layer, $featureReader, 0);
       $selectionXml = $selection->ToXml();
?>
<body class="AppFrame" onLoad="OnPageLoad()">
</body>
<script language="javascript">
function OnPageLoad()
{
selectionXml = '<?php echo $selectionXml; ?>';
parent.parent.SetSelectionXML(selectionXml);
}
</script>
....

Hope this will help. Most of these basic tasks are described in developer's guide

Regards : Stefan Dalakov


padmini godavarthi wrote:

  Hi,
iam using mapguide opensource 2.0(with .net 2.0 +IIS 5.1). i have a polygon
layer loaded on the map.
Now i want to select a particular polygon (for ex: parcel_id=222) on the map
programmetically and i want to change the color of polygon .
i know that in maestro if i check features on layer are selectable then the
polygon will be selected
but i want  to identify the polygon programmetically.


1) How is it possible?

can any body plz help me so that it will be helpful to me.



Thanks and Regards,
Padmini.


_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to