MapGuide API Reference
|
MgInsertFeatures::MgInsertFeatures | ( | CREFSTRING | className, |
MgBatchPropertyCollection * | propertyValueCollection | ||
) |
Constructs an insert command containing many features.
MgInsertFeatures(string className, MgBatchPropertyCollection propertyValueCollection); |
MgInsertFeatures(String className, MgBatchPropertyCollection propertyValueCollection); |
MgInsertFeatures(string className, MgBatchPropertyCollection propertyValueCollection); |
className | (String/string) The name of the class in the schema definition in the feature source used to create the feature instances to be inserted. |
propertyValueCollection | (MgBatchPropertyCollection) The collection of property collections to be inserted into the feature source. Each collection contains the property values for one feature. |
<?php $batchPropertyCollection = new MgBatchPropertyCollection(); $featCmdCollection = new MgFeatureCommandCollection(); for($i = 0; $i < 2; $i++) { $col = new MgPropertyCollection(); $featIdProp = new MgInt32Property($i); $col->Add($featIdProp); $batchPropertyCollection->Add($col); } $insertFeatures = new MgInsertFeatures("featClass", $batchPropertyCollection); $featCmdCollection->Add($insertFeatures); $useTransaction = false; $featureService->UpdateFeatures($featureSrcResourceId, $featCmdCollection, $useTransaction); ?>