function GetSelectionXML() { $resourceService = $this->site->CreateService(MgServiceType::ResourceService); $map = new MgMap(); $map->Open($resourceService, $this->args['MAPNAME']); $markupLayer = $map->GetLayers()->GetItem('_' . $this->GetMarkupName()); $selection = new MgSelection($map); $className = $markupLayer->GetFeatureClassName(); $ids = $this->args['MARKUPFEATURE']; if (is_array($ids)) { foreach ($ids as $id) { $selection->AddFeatureIdInt32($markupLayer, $className, (int) $id); } } else { $selection->AddFeatureIdInt32($markupLayer, $className, (int) $ids); } return $selection->ToXML(); }
function GetSelectionXML() { $resourceService = $this->site->CreateService(MgServiceType::ResourceService); $map = new MgMap(); $map->Open($resourceService, $this->args['MAPNAME']); $markupLayer = $map->GetLayers()->GetItem('_' . $this->GetMarkupName()); $selection = new MgSelection($map); $selection->AddFeatureIdInt32($markupLayer, $markupLayer->GetFeatureClassName(), (int) $this->args['MARKUPFEATURE']); return $selection->ToXML(); }