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.
Copyright (C) 2020, Humboldt State University, Jim Graham
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see
.
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 |
|
Clustering |
Clustering |
CMTYPE_BOOLEAN |
|
false |
|
MobileSupported |
Mobile Supported |
CMTYPE_BOOLEAN |
|
false |
true to enable jestures on phones and pads |
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 |
|
600 |
distance from a point or polyline the user needs to click to select it. |
Object Functions
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.