GenLayoutDoc method: IntBroker class
Syntax
GenLayoutDoc(layout_name, URI_index, &URI_doc [, use_custom_doc])
Description
Use the GenLayoutDoc method to return a new Document object from the one that was used to invoke the MAP layout. This allows you to run the MAP application and return just the data generated instead of the resulting HTML so that you can then generate a physical format (JSON or XML) from the Document.
Parameters
| Parameter | Description |
|---|---|
|
layout_name |
Specifies the name of the MAP application (layout) as a String value. |
|
URI_index |
Specifies the URI index as an Integer. |
|
&URI_doc |
Specifies the document for the MAP application to be invoked as a Document object. |
|
use_custom_doc |
Specifies an optional boolean value indicating whether to return the Document object based on the custom document instead of the parent document. |
Returns
A Document object.
Example
In the following example, the returned Document object is used to generate a JSON (JavaScript Object Notation) structure:
local Document &Doc1 = CreateDocument("MAP_LAYOUT", "QE_FLIGHTTEST1_MAP", "v1");
&COM2 = &Doc1.DocumentElement;
&COM2.GetPropertyByName("PAGE_ID").Value = "INIT";
&COM2.GetPropertyByName("LAYOUT_ID").Value = - 1;
&COM2.GetPropertyByName("Pilot").Value = "Major Tom";
local Document &Doc2 = %IntBroker.GenLayoutDoc("QE_FLIGHTTEST", 1, &Doc1);
local string &data = &Doc2.GenJsonString();