|
MapGuide API Reference
|
| virtual void MgMap::Create | ( | MgResourceIdentifier * | resource, |
| CREFSTRING | mapName, | ||
| INT32 | displayWidth, | ||
| INT32 | displayheight, | ||
| double | x, | ||
| double | y, | ||
| double | scale, | ||
| INT32 | dpi | ||
| ) | [virtual] |
Initializes a new MgMap object given a map definition or tile set definition and a name for the map with initial display parameters set. This method is used for MapGuide Viewers or for offline map production.
| void Create(MgResourceIdentifier mapDefinition, string mapName, int displayWidth, int displayHeight, double x, double y, double scale, int dpi); |
| void Create(MgResourceIdentifier mapDefinition, String mapName, int displayWidth, int displayHeight, double x, double y, double scale, int dpi); |
| void CreateStateless(MgResourceIdentifier mapDefinition, string mapName, int displayWidth, int displayHeight, double x, double y, double scale, int dpi); |
| resource | An MgResourceIdentifier that specifies the location of the map definition in a resource repository. |
| mapName | A string that specifies the name of the map. |
| displayWidth | The display width to initially set for the map |
| displayHeight | The display height to initially set for the map |
| x | The view center X coordinate to initially set for the map |
| y | The view center Y coordinate to initially set for the map |
| scale | The view scale to initially set for the map |
| dpi | The display DPI to initially set for the map |
// Assuming the site connection has already been intialized $resourceID = new MgResourceIdentifier('Library://Calgary/Maps/Calgary.MapDefinition'); $map = new MgMap($site); // Initializes the map to be centered on the Calgary CBD at 1:5000 scale with a DPI of 96 $map->CreateStateless($resourceID, 'Calgary', 640, 480, -114.054565, 51.068369, 5000.0, 96);