nodeType Method

Returns the node type.

nodeType();

Return Value

The node type. Can be any of the SGNodeType enumeration

Remarks

The node type is closely related to the innerObj property of the node and indicates what methods and properties the innerObj will have.

The node type is determined during the node creation. If, for example, the node was created using SGWorld.creator.createPolygon method, the node type would be sgNodeTypePolygon. Different node types, have different appearance and capabilities. For example, polygons have (among other properties) line style while labels have fonts (again, among other properties). To interact with the properties of a specific type, use the node’s innerObj property.