Go to object model Go to parent topic Go to previous topic Go to next topic

The MGPrimitive object allows you to query the individual primitives that make up a multi-primitive feature such as a GIS Design Server or redline feature.

You can also query simple, single-primitive features (point, text, or polyline features, for example), but doing so yields the same results as querying the entire feature.

MGPrimitive objects cannot be publicly created. To access this object, use the getPrimitives method or Primitives property of MGMapObject.

Java Development for Autodesk MapGuide Viewer Plug-In: For Autodesk MapGuide Viewer Plug-In, the Java class MGPrimitive extends java.lang.Object and can be found in the mapguide package, located in the npmapv32.zip file in the Netscape Plugins folder.

Java Development for Autodesk MapGuide Viewer, Java Edition: For Autodesk MapGuide Viewer, Java Edition, MGPrimitive is a Java interface that resides in the com.autodesk.mgjava package, which is located in the mgjava.cab file (for Windows systems only) and the mgjava.jar file (for all platforms).

Methods

getArea

Gets the area of the specified polygon map feature primitive.

getExtent

Gets the extents of the map feature primitive.

getLength

Gets the length of the specified polyline map feature primitive.

getParentObject

Gets the parent object of the primitive.

getTextValue

Gets the text value for a text primitive.

getType

Gets the type of map feature primitive.

getVertices

Gets the vertices used to describe the geometry of the map feature primitive.

Properties

Note that direct access to properties is only available in Autodesk MapGuide Viewer ActiveX Control. In Autodesk MapGuide Viewer Plug-In and Autodesk MapGuide Viewer, Java Edition APIs, get/set methods provide access to an object's properties. For compatibility, the ActiveX Control API supports the same get/set methods as the Autodesk MapGuide Viewer Plug-In and the Autodesk MapGuide Viewer, Java Edition APIs.

Area

The area of the specified polygon primitive in Mapping Coordinate System (MCS) units.

Length

The length of the specified polyline primitive in Mapping Coordinate System (MCS) units.

ParentObject

Gets the map feature that the primitive belongs to.

TextValue

Gets the string value of a text primitive.

Type

The map feature primitive type.