RegisterEvent

Land Desktop Map 3D Samples

 
RegisterEvent
 
 
 

Enter “RegisterEvent” at the Map 3D command-line. This causes the RegisterEventCommand method to be invoked.

The RegisterEventCommand method creates an instance of the EventRegister class, which is defined in EventRegister.cs, and calls its RegisterEvent method.

The RegisterEvent method creates an AcMapFeatureService object and registers an OSGeo.MapGuide.FeatureInsertedHandler object with it. The FeatureInsertedHandler will run when a feature is inserted. The handler registered is the NewFeaturesourceIdentifier method found in EventRegister.cs.

A FeatureInsertedHandler takes four arguments: (object sender, MgResourceIdentifier resId, string featureClassName, MgPropertyCollection properties). The sender argument is the AcMapFeatureService object. The resId argument identifies the feature source. The featureClassName argument identifies the feature class definition and is of the form <schemaName>:<className>. The properties argument contains the identity property of the feature inserted by the mapcheckin command.