MapGuide API Reference
|
virtual MgByteReader* MgDrawingService::GetLayer | ( | MgResourceIdentifier * | resource, |
CREFSTRING | sectionName, | ||
CREFSTRING | layerName | ||
) | [pure virtual] |
Gets a layer from a particular section of a DWF.
virtual MgByteReader GetLayer(MgResourceIdentifier resource, string sectionName, string layerName); |
virtual MgByteReader GetLayer(MgResourceIdentifier resource, String sectionName, String layerName); |
virtual MgByteReader GetLayer(MgResourceIdentifier resource, string sectionName, string layerName); |
resource | (MgResourceIdentifier) Resource identifier specifying the drawing source which has the DWF resource data. |
sectionName | (String/string) Name of the section. Section names can be retrieved via EnumerateSections or from the the manifest.xml file file via DescribeDrawing. |
layerName | (String/string) Name of the layer. Layer names can can be retrieved via EnumerateLayers. |
// Assuming the drawing service has already been initialized $drawing_ID = new MgResourceIdentifier('Library://DrawingService/Floorplan.DrawingSource'); $sectionName = 'com.autodesk.dwf.ePlot_9E2723744244DB8C44482263E654F764'; $layerName = 'YELLOW'; $byteReader = $drawingService->GetLayer($drawing_ID, $sectionName, $layerName);
MgDwfSectionNotFoundException | if the requested section does not exist in the DWF package. |
MgInvalidDwfSectionException | if the 2d graphics resource for the DWF section cannot be found. |
MgNullReferenceException | if data could not be read from the DWF resource. |
MgOutOfMemoryException | if there is insufficient memory to complete the operation. |
MgServiceNotAvailableException | if the underlying resource service cannot be obtained to access the drawing in the resource repository. |
MgXmlParserException | if there are problems parsing the resource content specified by the resource identifier. |
MgInvalidDwfPackageException | if the DWF specified by the resource identifier is not a DWF of version 6.0 or greater. |
MgLayerNotFoundException | if the requested layer does not exist in the requested section of the DWF package. |
MgDwfException | if the DWF component encounters errors. |