Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

GenerateLegendImage
GenerateMap
GenerateMapUpdate
GenerateMultiPlot
GeneratePlot
GeneratePlot
GeneratePlot
OperationId
opIdGenerateLegendImage
opIdGenerateLegendPlot
opIdGenerateMap
opIdGenerateMapUpdate
opIdGenerateMultiPlot
opIdGeneratePlot
opIdGeneratePlot2
opIdGeneratePlot3
opIdGeneratePlotWithLayout
opIdQueryFeatures
opIdQueryFeaturesWms
virtual MgByteReader* MgMappingService::GenerateMap | ( | MgMap * | map,
|  | CREFSTRING | mapAgentUri,
|  | MgDwfVersion * | dwfVersion |
| ) |  |  | `[virtual]`
Generates an eMap that describes the specified map. .NET Syntax
`virtual MgByteReader GenerateMap(MgMap map, string mapAgentUri, MgDwfVersion dwfVersion);`
Java Syntax
`virtual MgByteReader GenerateMap(MgMap map, String mapAgentUri, MgDwfVersion dwfVersion);`
PHP Syntax
`virtual MgByteReader GenerateMap(MgMap map, string mapAgentUri, MgDwfVersion dwfVersion);`
  Parameters:
  | map | (MgMap) Map object describing current state of map
  | mapAgentUri | (String/string) Http Uri for map agent
  | dwfVersion | (MgDwfVersion) DWF version required by the client. This determines the schema and file versions used to generate the DWFs sent back to the client.
Returns: Returns an MgByteReader object containing a DWF of the legend in eMap format. Example (PHP)
     // Assuming $resourceService and $mappingService have already been
     // initialized.
     // Get a runtime map from a map definition
     $resourceID = new  MgResourceIdentifier('Library://Calgary/Maps/Calgary.MapDefinition');
     $map = new MgMap();
     $map->Create($resourceService, $resourceID, 'Calgary');

     // Generate a DWF from the map
     $mapAgentURI = 'http://localhost/phpmapagent/mapAgent.php'; // Replace 'localhost' with your server name
     $dwfVersion = new MgDwfVersion('6.01','1.2');
     $byteReader = $mappingService->GenerateMap($map, $mapAgentURI, $dwfVersion);
  Exceptions:
  | MgNullArgumentException |

Comments or suggestions? Send us feedback.