| MGMap.selectWithin |
|
boolean selectWithin(MGCollection layers)
Selects features from the specified map layers that fall within the currently selected polygon map features.
After this method is complete, you can use getSelection to retrieve the contents of the selected features.
Currently, maps must be authored with the selection mode preference set to Centroid, not Intersection, for selectWithin to have consistent results. If your application is also selecting points in adjacent polygons that are near the selected polygon, chances are the Autodesk MapGuide selection mode preference is set to "intersection" instead of "centroid".
Note that this method does not work during a busy state. For additional information about the busy state, refer to "Handling Busy State and Map Refresh" chapter in the Autodesk MapGuide Developer's Guide.
layers - Collection of MGMapLayer objects to use in the selection.
boolean - Returns True if successful; otherwise, returns False.
-1 (busy)
-3 (illegal argument)
-12 (invalid selection)