Hi there,
In response to the first question, you don't use the viewer api. It is all done server side through the mapguide api. A feature query typically goes something as follows...
- Initialize the web tier.
- Create an MgFeatureService.
- Get the Feature Source Identifier of the layer you want to query.
- Create an MgFeatureQueryOptions object.
- Set your criteria filters on this object.
- Call MgFeatureService.SelectFeatures() passing the MgFeatureQueryOptions object, the Feature Source Identifier and the class name (table name) of the layer.
- Iterate through the MgFeatureReader that is returned.
- For each result in the MgFeatureReader, write out the properties to your html page.
In response to the second question, the most important thing to note is that all your invoke script commands run from the context of the *viewer frame*.
So when using the viewer api, you have to know where that frame (that contains the method you want to call) is relative to the viewer frame.
- Jackie