Class CMItem extends CMBase
CMItem
An item is something that is displayed and typically can be edited
by a user. Items includeobjects such as arrows, boxes, labels, and ovals.
A CMLayer (geospatial layer) is a subclass of this class.
Adds:
- Name of the item
- Position of items
- Styles for drawing graphics and text
- Painting
- Status including: hidden, visible, selectable, and editable
- Popup menus
- Layer list contents
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:[0,0] |
x,y, and z values to offset the item |
Rotations |
Rotation Vector |
CMTYPE_VECTOR |
|
null,Initial:[0,0] |
pitch, roll, and yaw values (x,y,z) values to roatate the item in degrees |
Scales |
Scaling Vector |
CMTYPE_VECTOR |
|
null,Initial:[1,1] |
x,y, and z scaling values for the item's size |
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 |
PropertyURL |
PropertyURL |
CMTYPE_STRING |
|
|
optional URL to load properties from |
Status |
Status |
CMTYPE_INDEXES |
CMSTATUS_OPTIONS, Default:CMSTATUS_SELECTABLE |
CMSTATUS_SELECTABLE |
How the item appears to the user and how the user can interact with it |
Style |
Style |
CMTYPE_OBJECT |
|
null |
standard HTML 5 settings except the defaults may change and |
LineWidthInMapUnits |
Line Width In Map Units |
CMTYPE_BOOLEAN |
|
|
size the line as the user zooms in and out |
Text |
Text |
CMTYPE_STRING |
|
null |
text that will appear in the item |
TextVisible |
Text Visible |
CMTYPE_BOOLEAN |
|
true |
true to make theitem visible, false for hidden |
FontSizeInMapUnits |
Font Size In Map Units |
CMTYPE_BOOLEAN |
|
true |
size the font as the user zooms in and out |
TextStyle |
Text Style |
CMTYPE_OBJECT |
|
null |
standard HTML 5 settings except the defaults may change |
Object Functions
Object Functions
GetBounds()
Gets the bounds of all the layer bounds combined.