JavaScript Objects

Conceptually an object is passed to the template and its properties can be used to display the results.

Results are processed in Javascript hence the object passed to the template will be a Javascript object. This has a few benefits:

  • If a property is an array type the number of items in the array can be obtained by using the length property of the array.
  • Events can be bound to elements.
  • Functions can be called to manipulate the data.
AMP Summary Object
Property Name Data Type Notes
Name string The name of the overlay
Number integer The overlay index
Items Array of AMP item objects The found items


AMP Item Object
Property Name Data Type Notes

OverlayName

string

The name of the overlay this item is on

OverlayNo

integer

The overlay index

Name

string

The name of this item, this will be the first schema column marked as a MapTip in the SWD.

ItemID

integer

For memory datasets this will be a unique number. For cursor datasets this property will be null.

Bookmark

object

For cursor datasets this will be a unique number. For memory datasets this property will be null.

Attributes

Array of Item Attribute objects

The attributes for this item. Only schema columns marked as a MapTip will appear here.



FMN Summary Object
Property Name Data Type Notes

Name

string

The name of the overlay

Number

integer

The overlay index

DidNearestXItems

bool

Indicates if a nearest x was performed on this overlay

NearestXItems

integer

How many items the nearest X search looked for

SearchRadius

double

If doing an area search, this property will hold the search radius

Items

Array of Item objects

The found items



FMN Item Objects
Property Name Data Type Notes

OverlayName

string

The name of the overlay this item is on

OverlayNo

integer

The overlay index

Name

string

The name of this item, this will be the first schema column marked as a MapTip in the SWD

Origin

SisVector

The coordinates of the centre of this item.

Distance

double

The distance from the selected point to the Origin of this item

ItemID

integer

For memory datasets this will be a unique number.
For cursor datasets this property will be null.

Bookmark

object

For cursor datasets this will be a unique number.
For memory datasets this property will be null.

Attributes

Array of Attribute objects

The attributes for this item. Only schema columns marked as a MapTip will appear here.



SISVector Object
Property Name Data Type Notes
x

double

The x coordinate

y

double

The y coordinate

z

double

The z coordinate



Attribute Object
Property Name Data Type Notes

Name

string

The name of the schema column

Value

string

The value for this schema column