To do this, you have to know what the Xml structure for selections is:
http://techearth.net/gis/mapguideManual/index.php5?title=MapGuide_Manual:Programmer:Active_selections

The xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<FeatureSet>
  <Layer id="6f0528ca-0000-1000-8000-005056c00008">
     <Class id="Default:Parcels">
        <ID>piwAAA==</ID>
     </Class>
  </Layer>
</FeatureSet>

The layer id can be read from the runtime map layer's Id property.
The class property is called FeatureName (I think).

You can have multiple <Layer>, <Class> and <ID> elements.

To select one feature from one layer, and two features from another layer, just add them:
<?xml version="1.0" encoding="UTF-8"?>
<FeatureSet>
  <Layer id="6f0528ca-0000-1000-8000-005056c00008">
     <Class id="Default:Parcels">
        <ID>piwAAA==</ID>
     </Class>
  </Layer>
  <Layer id="6f0528ca-0000-1000-8000-ff5056cffff8">
     <Class id="Default:Roads">
        <ID>zarAAA==</ID>
        <ID>rt7AAA==</ID>
     </Class>
  </Layer>
</FeatureSet>


Regards, Kenneth Skovhede, GEOGRAF A/S



Amit Kumar Shukla skrev:

Hi List,
I'm using MapGuide Open Source 2.1 Beta 1. I want to do selection of selected feature as well as features near to it. How can I show selection of both, if features are in different layers. Selection in one layer is working properly .

Hopefully someone help me.

Thanks & regards.
Amit
------------------------------------------------------------------------

_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to