Web API Reference MapGuide Open Source

void MgMap::Create MgResourceService resourceService,
MgResourceIdentifier mapDefinition,
CREFSTRING  mapName
 

Initializes a new MgMap object given a resource service, map definition, and a name for the map. This method is used for MapGuide Viewers or for offline map production.

.Net Syntax
void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, string mapName);
Java Syntax
void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, String mapName);
PHP Syntax
void Create(MgResourceService resourceService, MgResourceIdentifier mapDefinition, string mapName);

Parameters:
resourceService (MgResourceService) An MgResourceService that can be used to retrieve the map definition.
mapDefinition (MgResourceIdentifier) An MgResourceIdentifier that specifies the location of the map definition in a resource repository.
mapName (String/string) A string that specifies the name of the map.
Example (PHP)
    /// // Assuming the resource service has already been intialized
    /// $resourceID = new  MgResourceIdentifier('Library://Calgary/Maps/Calgary.MapDefinition');
    /// $map = new MgMap();
    /// $map->Create($resourceService, $resourceID, 'Calgary');
    ///