Class CMView extends CMItem
CMView Class
This class manages the canvas and allows the map to be zoomed and panned.
It also provides commont painting functions such as rectangles, circles,
text, and rasters. The functions are available with locations in pixel
or reference (map) coordinate values.
The view is also an item that can appear in other views. This is important
for authors working with 3D scenes to be able to see where their views are.
Settings Group: Position
Setting | Name | Type | Options | Default | Comments |
---|---|---|---|---|---|
Translations | Position Offset Vector | CMTYPE_VECTOR | null,Initial:[1,1] | x,y, and z values to offset the item | |
Scales | Scaling Vector | CMTYPE_VECTOR | null,Initial:[1,1] | x,y, and z scaling values for the item's size |
Settings Group: View
Setting | Name | Type | Options | Default | Comments |
---|---|---|---|---|---|
CollisionChecking | Collision Checking | CMTYPE_BOOLEAN | true | ||
GesturePanDistance | Gesture Pan Distance | CMTYPE_FLOAT | 8 | Distance to move with each pan event in pixels | |
GestureZoomAmount | Gesture Zoom Amount | CMTYPE_FLOAT | 0.05 | Amount to zoom in and out on pinch events |
Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree Name Name CMTYPE_STRING Name that appears in the item and layer lists Status Status CMTYPE_INDEXES CMSTATUS_OPTIONS, Default:CMSTATUS_SELECTABLE CMSTATUS_SELECTABLE How the item appears to the user and how the user can PixelTolerance Pixel Tolerance CMTYPE_FLOAT 6 distance from a point or polyline the user needs to click to select it.
Object Functions
Inherited From: CMItem
Returns | Function | Throws |
---|---|---|
AddMapElement(TheElement) | ||
GetCanvasElement() | ||
SaveStyle() | ||
RestoreStyle() | ||
Paint() |
Object Functions
AddMapElement(TheElement)
Add a new map element to the scene (e.g. a scale bar)
Parameters:
TheElement -
GetCanvasElement()
Get the Canvas element associated with this view.
SaveStyle()
Saves the current style to a stack
RestoreStyle()
Restores the style from the stack
Paint()
Paints the contents of the view. Called by the Scene which is called by the
CanvasMap object.