Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

ApplyResourcePackage
ChangeResourceOwner
CopyResource
DeleteResource
DeleteResourceData
EnumerateReferences
EnumerateResourceData
EnumerateResources
EnumerateResources
EnumerateUnmanagedData
GetRepositoryContent
GetRepositoryHeader
GetResourceContent
GetResourceData
GetResourceHeader
InheritPermissionsFrom
MoveResource
RenameResourceData
ResourceExists
SetResource
SetResourceData
UpdateRepository
virtual MgByteReader* MgResourceService::GetResourceData | ( | MgResourceIdentifier * | resource,
|  | CREFSTRING | dataName |
| ) |  |  | `[virtual]`
Returns the resource data for the specified resource. .NET Syntax
`MgByteReader GetResourceData(MgResourceIdentifier resource, string dataName);`
Java Syntax
`MgByteReader GetResourceData(MgResourceIdentifier resource, String dataName);`
PHP Syntax
`MgByteReader GetResourceData(MgResourceIdentifier resource, string dataName);`
  Parameters:
  | resource | (MgResourceIdentifier) The resource for which the resource data will be obtained.
  | dataName | (String/string) Name for data (as specified when the data was set via SetResourceData ).
Returns: Returns an MgByteReader object containing the resource data. Example (PHP)
     // Assuming that $resourceService has already been initialized
     $resourceID = new MgResourceIdentifier("Library://Geography/Calgary points of interest.FeatureSource");
     $byteReader = $resourceService->GetResourceData($resourceID, "locations of points of interest");
     $byteSink = new MgByteSink($byteReader);
     $byteSink->ToFile('C:\temp\points.sdf');
  Exceptions:
  | MgResourceDataNotFoundException |
  | MgInvalidResourceTypeException |
See also: SetResourceData EnumerateResourceData RenameResourceData DeleteResourceData

Comments or suggestions? Send us feedback.