Highlight

Land Desktop Map 3D Samples

 
Highlight
 
 
 

This method will place all the features within a layer in a selection set and the highlight the features within the set. It does the following:

  1. Gets the current map, an AcMapMap object.
  2. Creates an MgSelectionBase object using the AcMapMap object as a constructor argument.
  3. Uses the MgLayerBase argument to get the feature source’s schema and class names.
  4. Uses the MgLayerBase argument to create an MgResourceIdentifier object for the layer’s feature source.
  5. Uses an MgFeatureService object, the MgResourceIdentifier object, and the schema and class names to get the MgClassDefinition object for the feature source.
  6. Uses the MgClassDefinition object to the get the class’s identity property definitions.
  7. Adds the name of each identity property definition to an MgFeatureQueryOptions object and to a string collection.
  8. Uses an MgFeatureService object, the MgResourceIdentifier object, the MgFeatureQueryOptions object, and the fully qualified feature class name (<schemaName>:<className>) to select features from the feature source and put them in an MgFeatureReader object.
  9. For each feature in the reader does the following:
    • Puts the feature properties into an MgPropertyCollection object. This is described in topic ReadFeature.
    • Gets the value of the identity property from the property collection.
    • Adds the identity property value to the MgSelectionBase object.
  10. Uses the MgSelectionBase object to select features in the AcMapMap object.
  11. Uses the AcMapMap object to highlight the selected features.