CanvasMap
Getting Started Tutorials 3D Reference

Class Reference

Below is a list of the functions that are publically available in classes in CanvasMap.These functions are going to be placed under 'controlled change' where developers will be notified at least a year in advance before they change. Click on the name of a class to see details on the class. If you see functions you would recommend changes to or would like to see additional functions added to this list, please contact SchoonerTurtles.

CM2Layer extends CMLayer

File: CM2Layer

Settings Group: Mark

Setting Name Type Options Default Comments
Type Type CMTYPE_ENUMERATED CMMARK_CIRCLE, CMMARK_TRIANGLE, CMMARK_SQUARE, CMMARK_STAR CMMARK_CIRCLE
Size Size CMTYPE_FLOAT 3
SizeInMapUnits Size In Map Units CMTYPE_BOOLEAN size the mark as the user zooms in and out

Settings Group: IconImage

Setting Name Type Options Default Comments
URL URL CMTYPE_URL
TheImage Image CMTYPE_IMAGE null
OffsetX Offset X CMTYPE_FLOAT 0
OffsetY Offset Y CMTYPE_FLOAT 0

Settings Group: LabelBox

Setting Name Type Options Default Comments
Location Location CMTYPE_INDEXES CMLABEL_LOCATIONS, Default:CMLABEL_TOP_RIGHT CMLABEL_TOP_RIGHT
OffsetX Offset X CMTYPE_FLOAT 0
OffsetY Offset Y CMTYPE_FLOAT 0
Padding Padding CMTYPE_FLOAT 2

LabelStyle Label Style CMTYPE_OBJECT null standard HTML 5 settings except the defaults may change MouseOverStyle Mouse Over Style CMTYPE_OBJECT standard HTML 5 settings SelectedStyle Selected Style CMTYPE_OBJECT null standard HTML 5 settings

Static Functions

ReturnsFunctionThrows
PaintMark()

Object Functions

Inherited From: CMLayer
ReturnsFunctionThrows
SetIconImage(TheURL, OffsetX, OffsetY)
SetFeatureIconImage(TheURL, OffsetX, OffsetY)

CM2View extends CMView

File: CM2View

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

Settings Group: View2D

Setting Name Type Options Default Comments
MinZoom Min Zoom CMTYPE_FLOAT -100
MaxZoom Max Zoom CMTYPE_FLOAT 100
MaxBounds Max Bounds CMTYPE_BOUNDS null

Object Functions

Inherited From: CMView
ReturnsFunctionThrows
ZoomLevel GetZoomLevel()
SaveStyle()
RestoreStyle()
PaintImage(TheImage, PixelX, PixelY)
PaintBackground()
PaintCircle(X, Y, RadiusInPixels)
PaintRect(PixelXMin, PixelXMax, PixelYMin, PixelYMax)
PaintRoundedRect(PixelXMin, PixelXMax, PixelYMin, PixelYMax, PixelXRadius, PixelYRadius)
PaintText(XInPixels, YInPixels, Text, RadAngle)
GetRefTolerance()
GetTextWidthInPixels()
GetContext()
The GetBounds()
SetRefCenter(RefX, RefY)
Result GetRefCenter()
ZoomToBounds(NewBounds)
ZoomToMaxBounds()
ZoomIn()
ZoomOut()
ZoomTo(ZoomLevel)
ZoomToCursorCoordinate(ZoomLevel)
PixelX GetPixelXFromRefX(RefX)
PixelY GetPixelYFromRefY(RefY)
PixelCoordinate GetPixelFromRef(RefX, RefY)
PixelWidth GetPixelWidthFromRefWidth(RefWidth)
PixelHeight GetPixelHeightFromRefHeight(RefHeight)
RefWidth GetRefWidthFromPixelWidth(PixelWidth)
RefHeight GetRefHeightFromPixelHeight(PixelHeight)
RefX GetRefXFromPixelX(PixelX)
RefY GetRefYFromPixelY(PixelY)
PaintRefBounds(TheBounds)
PaintRefRect(XMin, XMax, YMin, YMax)
PaintRefArc(XMin, XMax, YMin, YMax, StartAngle, EndAngle)
PaintRefRoundedRect(XMin, XMax, YMin, YMax, RefXRadius, RefYRadius)
PaintRefCircle(X, Y, RadiusInPixels)
PaintRefText(Text, RefX, RefY, FontSize, HAlign, RadAngle)
PaintRefLine(X1, Y1, X2, Y2)
PaintRefPoly(Xs, Ys, Closed, Fill, Stroke)
PaintRefArea(TheArea, Closed, Fill, Stroke)
PaintRefRegion(TheArea, Closed, Fill, Stroke)
PaintRefImage(TheImage, RefX, RefY)
PaintRefImageScaled(TheImage, RefX, RefY, RefWidth, RefHeight)
CreateInfoWindow(ID, RefX, RefY, WindowWidth, WindowHeight, TheHTML)

CMBase

File: CMBase
Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree PropertyURL PropertyURL CMTYPE_STRING optional URL to load properties (jjg?)

Static Functions

ReturnsFunctionThrows
UniqueNumber GetUniqueNumber()
Selected SetSelected()

Object Functions

ReturnsFunctionThrows
Name Deallocate()
AddChild(TheObject)
RemoveChild(Index)
InsertChild(Index)
NumChildren GetNumChildren(TheClass)
TheChild GetChild(Index, TheClass)
ChildIndex GetChildIndex(TheChild)
MoveChild(TheChild, Index)
TheChild GetNumDescendants(Index, TheClass)
GetDescendant(Index, CurrentRow)
SendMessageToDescendants()
UniqueNumber AddListener(TheFunction, TheMessage, TheListener)
RemoveListener(TheMessage, UniqueNumber)
SendMessageToListeners(TheMessage, AdditionalInfo)
Settings GetAllSettings()
SetAllSettings(NewSettings)
Value GetGroupDefs(Group, Default)
GetSettingDefinition(Param1, Param2)
GetSetting(Param1, Param2, Param3)
SetSetting(Param1, Param2, Param3)
UnselectAll()

CMControlPoints

File: CMControlPoints

CMDataset extends CMBase

File: CMDataset

Enumerated Types

    CMDataset.GEOJSON=1
    CMDataset.PYRAMID=2
    CMDataset.PYRAMID_OPEN_FORMAT=3
    CMDataset.RASTER=4
    CMDataset.SQL=5

    CMDataset.LOAD_STATUS_NONE=1 - request has just been created and is not in the que yet
    CMDataset.LOAD_STATUS_PENDING=4 - element is waiting in the que
    CMDataset.LOAD_STATUS_LOADING=2 - request to load was sent and waiting for element to load
    CMDataset.LOAD_STATUS_LOADED=3 - element is loaded
    CMDataset.LOAD_STATUS_CANCELED=5 - request was canceled, probably from the user changing the zoom level (moves request out of request que)

Object Functions

Inherited From: CMBase
ReturnsFunctionThrows
Number GetNumAttributeRows()
Number GetNumAttributeColumns()
Specified GetAttributeHeading()
Array GetAttributeHeadings()
Array GetAttributeIndexFromHeading()
Specified GetAttributeCell(ColumnIndex, RowIndex)
Specified GetAttributeCellByHeading(Heading, RowIndex)
AddAttributeHeading(NewHeading, DefaultValue)
SetAttributeCell(ColumnIndex, RowIndex, Value)
GetAttributeArray(Heading)
SetProjector(NewProjector)
Current GetProjector()

CMDatasetGeoJSON extends CMDatasetVector

File: CMDatasetGeoJSON

Static Functions

ReturnsFunctionThrows
EncodeAttributes()
DecodeAttributes()

Object Functions

Inherited From: CMDatasetVector
ReturnsFunctionThrows
SetURL()
SetGeoJSONFeatures(-)
SetGeoJSON(TheGeoJSONObject, ZoomToBounds)

CMDatasetPyramid extends CMDataset

File: CMDatasetPyramid

CMDatasetPyramidOpenFormat extends CMDatasetPyramid

File: CMDatasetPyramidOpenFormat

File: CMDatasetPyramidOpenFormat

CMDatasetRaster extends CMDataset

File: CMDatasetRaster

Object Functions

Inherited From: CMDataset
ReturnsFunctionThrows
SetBounds(NewBounds)
Bounds GetBounds()
GetSampleFromRef()
GetSampleFromRef_PixelsInCorners()
GetPathArray()

CMDatasetVector extends CMDataset

File: CMDatasetVector

Object Functions

Inherited From: CMDataset
ReturnsFunctionThrows
SetBounds(NewBounds)
Bounds GetBounds()
Bounds GetFeatureBounds()
[FeatureIndex,AreaIndex,PolyIndex,PointIndex] GetInChain()
InFeature(Chain)
InLineSegment()
Paint()
AddPoint()
AddPolyline()
AddPolygon()
SetPosition()

CMDefs

File: CMDefs

Enumerated Types

    CMTYPE_COORDINATES=1 - coordinates as lat/lon or easting/northing {Xs:[],Ys[],Zs[]}
    CMTYPE_COLOR=2 - an HTML color, typically rgb(...)
    CMTYPE_INTEGER=3
    CMTYPE_BOOLEAN=4
    CMTYPE_FLOAT=5
    CMTYPE_CSS_STYLE=6 - jjg - replace this with DATA_TYPE_COLOR and transparency as float 0 to 1?
    CMTYPE_ENUMERATED=7 - value is selected from an array of possible options
    CMTYPE_URL=8 - points to a resource
    CMTYPE_STRING=9 - standard text string
    CMTYPE_IMAGE=10 - JavaScript img object
    CMTYPE_FONT=11 - CSS font specification
    CMTYPE_BOUNDS=12 - bounds objects with XMin,YMin,XMax,YMax
    CMTYPE_BOOLEAN_ARRAY=13
    CMTYPE_VECTOR=14 - x,y and optional z value [x,y,z]
    CMTYPE_INDEXES=15 - array of options where the value is an index (jjg - faster than string comparisons for enumerated)
    CMTYPE_OBJECT=16 - array of options where the value is an index (jjg - faster than string comparisons for enumerated)
    CMTYPE_COLOR_ARRAY=17
    CMTYPE_FLOAT_ARRAY=18
    CMTYPE_STRING_ARRAY=19
    CMTYPE_INTEGER_ARRAY=20
    CMTYPE_OBJECT_ARRAY=21

    CMSTATUS_HIDDEN=0
    CMSTATUS_VISIBLE=1
    CMSTATUS_SELECTABLE=2
    CMSTATUS_EDITABLE=3

    CMLABEL_TOP_LEFT=0
    CMLABEL_TOP=1
    CMLABEL_TOP_RIGHT=2
    CMLABEL_RIGHT=3
    CMLABEL_BOTTOM_RIGHT=3
    CMLABEL_BOTTOM=4
    CMLABEL_BOTTOM_LEFT=5
    CMLABEL_LEFT=6

    CMMARK_CIRCLE=0
    CMMARK_TRIANGLE=1
    CMMARK_SQUARE=2
    CMMARK_STAR=3

CMGeo extends CMItem

File: CMGeo
DynamicProjections Dynamic Projections CMTYPE_BOOLEAN false True to change projections on the fly

Object Functions

Inherited From: CMItem
ReturnsFunctionThrows
SetProjector(TheProjector)
Paint(TheView)

CMItem extends CMBase

File: CMItem

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 MouseOverAction Mouse Over Action CMTYPE_OBJECT null link, tooltip, post (jjg replaced by AdditionaProperties) MouseDownAction Mouse Down Action CMTYPE_OBJECT null link, tooltip, post

Object Functions

Inherited From: CMBase
ReturnsFunctionThrows
GetBounds()

CMItemHTML extends CMItem

File: CMItemHTML

Settings Group: HTML

Setting Name Type Options Default Comments
ClassName Class Name CMTYPE_STRING HTML text to set into the div
Position Type CMTYPE_ENUMERATED CMLABEL_LOCATIONS Default is undefined which will center the div
OffsetX Offset X CMTYPE_FLOAT 0
OffsetY Offset Y CMTYPE_FLOAT 0

CMItemIcon extends CMItem

File: CMItemIcon

Settings Group: HTML

Setting Name Type Options Default Comments
Position Type CMTYPE_ENUMERATED CMLABEL_LOCATIONS

Icon Icon CMTYPE_STRING insert_emoticon CSS CSS CMTYPE_OBJECT MouseDownAction Actions CMTYPE_OBJECT jjg - not being used yet

CMItemPoly extends CMItem

File: CMItemPoly

Object Functions

Inherited From: CMItem
ReturnsFunctionThrows
SetControlPoints()
GetClosed()

CMItemPolyArrow extends CMItemPoly

File: CMItemPolyArrow

Settings Group: Arrow

Setting Name Type Options Default Comments
BarbWidth Barb Width CMTYPE_FLOAT 5
BarbLength Barb Length CMTYPE_FLOAT 5
ShaftWidth Shaft Width CMTYPE_FLOAT 2
HeadLength Head Length CMTYPE_FLOAT 4

CMItemRect extends CMItem

File: CMItemRect
Extent Extent CMTYPE_BOUNDS {XMin:0,XMax:10,YMin:0,YMax:10

CMItemRoundedRect extends CMItemRect

File: CMItemRoundedRect

Settings Group: RoundedRectangle

Setting Name Type Options Default Comments
RoundedCornerWidth Corner Width CMTYPE_FLOAT 3
RoundedCornerHeight Corner Height CMTYPE_FLOAT 3

CMLayer extends CMItem

File: CMLayer

Settings Group: InfoWindow

Setting Name Type Options Default Comments
Width Width CMTYPE_INTEGER 300

Settings Group: Layer

Setting Name Type Options Default Comments
InfoText Info Text CMTYPE_STRING undefined HTML content to appear in the Info box
Metadata Metadata CMTYPE_STRING undefined source information for the data in the layer
MinZoom Min Zoom CMTYPE_FLOAT -Infinity layer is hidden below this zoom level
MaxZoom Max Zoom CMTYPE_FLOAT Infinity layer is hidden above this zoom level
ZoomToBoundsOnLoad Zoom To Bounds On Load CMTYPE_BOOLEAN false If true, the scene will zoom to the layer bounds after the layer's data is loaded
IconCanvasWidth Icon Canvas Width CMTYPE_FLOAT 18 Sets the width, in pixels of the canvas used to create the icon
IconCanvasHeight Icon Canvas Height CMTYPE_FLOAT 18 Sets the height, in pixels, of the canvas used to create the icon

Object Functions

Inherited From: CMItem
ReturnsFunctionThrows
Bounds GetBounds()
SetBounds(NewBounds)
SetSelectedFeature(NewFeatureIndex)
SetMouseOverFeature(NewFeatureIndex)
MouseOverFeatureIndex GetMouseOverFeature()
SetSettingAttribute(Param1, Param2, Param3)
SetFeatureSettings(FeatureIndex, FeatureProperties)
SetFeatureSetting(Key, FeatureIndex, Value)
Value GetFeatureSetting(Key, FeatureIndex, Default)
SetProjector()
RequestData()

CMLayerCategories extends CMLayerUniqueValues

File: CMLayerCategories

Settings Group: Categories

Setting Name Type Options Default Comments
Mins Minimums CMTYPE_FLOAT_ARRAY null
Maxs Maximums CMTYPE_FLOAT_ARRAY null

CMLayerDataset extends CM2Layer

File: CMLayerDataset

Settings Group: Dataset

Setting Name Type Options Default Comments
URL URL CMTYPE_STRING null Full or partial URL to the dataset to load into the layer
Format Format CMTYPE_INDEXES CMDataset.FormatOptions, Values:CMDataset.FormatValues Type of data to load. This also defines the type of dataset object if this layer needs to define it.
NorthPoleColor NorthPoleColor CMTYPE_COLOR null Color used to fill in the north pole for pyramid layers
SouthPoleColor SouthPoleColor CMTYPE_COLOR null Color used to fill in the south pole for pyramid layers

Object Functions

Inherited From: CM2Layer
ReturnsFunctionThrows
SetBounds(NewBounds)
Bounds GetBounds()
SetSelectedFeature(NewFeatureIndex)
SetRandomFillStyles(NewFeatureIndex)
RequestData()
SetData(TheData, DataSetType)
TheDataset HaveDataset()
SetDataset(NewDataset)
SetOnLoadProjector()

CMLayerGraticule extends CM2Layer

File: CMLayerGraticule

Settings Group: Graticule

Setting Name Type Options Default Comments
East East CMTYPE_FLOAT 180
West West CMTYPE_FLOAT -180
North North CMTYPE_FLOAT 90
South South CMTYPE_FLOAT -90
Spacing Spacing CMTYPE_FLOAT 200 / desired spacing for the graticules in pixels
DegreeSpacing Degree Spacing CMTYPE_FLOAT -1 only implemented for 3d
TextSpacing Text Spacing CMTYPE_FLOAT 360 only implemented for 3d

Settings Group: Border

Setting Name Type Options Default Comments
strokeStyle Line Style CMTYPE_CSS_STYLE rgb(0,0,0)
fillStyle Fill Style CMTYPE_CSS_STYLE rgb(255,255,255)
lineWidth Width CMTYPE_INTEGER 3
BorderWidth Border Width CMTYPE_FLOAT 12

Settings Group: BorderText

Setting Name Type Options Default Comments
font Font CMTYPE_FONT 14px Arial
strokeStyle Line Style CMTYPE_CSS_STYLE rgb(0,0,0)
lineWidth Width CMTYPE_INTEGER 1
fillStyle Fill Style CMTYPE_CSS_STYLE rgb(0,0,0)

CMLayerGrid extends CM2Layer

File: CMLayerGrid

Settings Group: Dataset

Setting Name Type Options Default Comments
URL URL CMTYPE_STRING null Full or partial URL to the dataset to load into the layer

Object Functions

Inherited From: CM2Layer
ReturnsFunctionThrows
RequestData(URL, DataSetType)

CMLayerItems extends CM2Layer

File: CMLayerItems

CMLayerList extends CMLayer

File: CMLayerList
Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree 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

CMLayerBackgrounds extends CMLayer

File: CMLayerList
Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree 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 SelectedBackground Selected Background Index CMTYPE_INTEGER 0 How the item appears to the user and how the user can interact with it

CMLayerRange extends CMLayerUniqueValues

File: CMLayerRange
Range Minimum CMTYPE_FLOAT null Max Maximum CMTYPE_FLOAT null

CMLayerRaster extends CM2Layer

File: CMLayerRaster

Settings Group: Raster

Setting Name Type Options Default Comments
Bounds Bounds CMTYPE_BOUNDS null Bounds object for the raster with XMin,XMax,YMin,YMax values

Settings Group: Dataset

Setting Name Type Options Default Comments
URL URL CMTYPE_STRING null Full or partial URL to the dataset to load into the layer

CMLayerUniqueValues extends CMLayerDataset

File: CMLayerUniqueValues

Settings Group: UniqueValues

Setting Name Type Options Default Comments
AttributeName Attribute Name CMTYPE_STRING
Styles Styles CMTYPE_OBJECT_ARRAY null
Names Names CMTYPE_STRING_ARRAY null
MarkTypes Mark Types CMTYPE_INTEGER_ARRAY null
MarkIcons Mark Icon CMTYPE_STRING_ARRAY null
MarkSizes Mark Sizes CMTYPE_FLOAT_ARRAY null

CMMainContainer extends CMPanel

File: CMMainContainer

Settings Group: MainContainer

Setting Name Type Options Default Comments
Scene3D 3D Scene CMTYPE_BOOLEAN false true to create a 3D scene instead of a 2D scene
AllowMouseEvents Allow Mouse Events CMTYPE_BOOLEAN true false to create a static map
Resize Resize CMTYPE_BOOLEAN false true to have the map automatically resize when the window is resized
ImageFolder Image Folder CMTYPE_STRING ../Images/ (jjg no longer used) path to the folder with the images for the main container (e.g. tool icons)
MapNumber MapNumber CMTYPE_INTEGER 0 true to have the map automatically resize when the window is resized
MainContainerElementID MainContainer Element ID CMTYPE_STRING CM_MapContainer
MainContainerClassName MainContainer Class Name CMTYPE_STRING CM_MapContainer
CanvasContainerID Canvas Container ID CMTYPE_STRING CM_CanvasContainer
CanvasContainerClassName Canvas Container Class Name CMTYPE_STRING CM_CanvasContainer
CanvasContainerWithoutPanelsClassName Canvas Container Without Panels Class Name CMTYPE_STRING CM_CanvasContainerWithoutPanels
CanvasID Canvas ID CMTYPE_STRING CM_Canvas
CanvasClassName Canvas Class Name CMTYPE_STRING CM_Canvas
PanelFooterID Footer Panel ID CMTYPE_STRING
PanelToolID Tool Panel ID CMTYPE_STRING
PanelButtonsID Button Panel ID CMTYPE_STRING
ControlsLocation Controls Location CMTYPE_ENUMERATED "None", "MainContainer", "CanvasContainer" MainContainer specify whether to have the controls in a panel in the main container or on top of the map
IncludeLayerList Include Layer List CMTYPE_BOOLEAN true true to add the panel with the list of foreground layers
IncludeBackgroundPanel IncludeBackgroundPanel CMTYPE_BOOLEAN true true to add the panel with the list of background layrs
IncludeSearchPanel IncludeSearchPanel CMTYPE_BOOLEAN true true to add the search options
IncludeDevEditor Include Dev Editor CMTYPE_BOOLEAN false true to add the development editor panels

Static Functions

ReturnsFunctionThrows
SetPopupWindow(NewPopupWindow)
AddPopupWindow(NewPopupWindow)
HidePopupWindows()
AddGlobalEventListener()
RemoveGlobalEventListener()

Object Functions

Inherited From: CMPanel
ReturnsFunctionThrows
SetCoordinateUnits(CoordinateUnits)
SimpleMap()
CanvasFullScreen()
Initialize(TheView)
TheScene GetScene()
GetGeo()
GetLayerForegrounds()
GetLayerBackgrounds()
TheView GetView()
TheToolPanel GetToolPanel()
footer GetPanelFooter()
SetProjector(TheProjector)
TheProjector GetProjector()
SelectTool(ViewToolDef)
AddLayer(NewLayer)
AddBackground(NewLayer)
AddBackgrounds(NewLayer)
SetSelectedBackgroundIndex()
ZoomIn()
ZoomOut()
ZoomToMax()
ZoomToBounds(TheBounds)
ZoomTo(ZoomLevel)
SetRefCenter(RefX, RefY)
StartMap(ResizeFlag)
Resize()

CMNorthArrow extends CMItem

File: CMNorthArrow

Settings Group: NorthArrow

Setting Name Type Options Default Comments
Scale Scale CMTYPE_FLOAT 1
ClassName Class Name CMTYPE_STRING CM_NorthArrow link to the SVG file that contains the arrow
URL URL CMTYPE_STRING null

CMPanel extends CMBase

File: CMPanel
Name Name CMTYPE_STRING Name that appears to the user for the object Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree PropertyURL PropertyURL CMTYPE_STRING optional URL to load prope ClassName Class Name CMTYPE_STRING Name that appears to the user for the object CSS CMTYPE_OBJECT

CMPanelBackgrounds extends CMPanel

File: CMPanelBackgrounds
LayerListItemHeight Layer List Item Height CMTYPE_FLOAT 28 Height, in pixels, for each item in the layer list RadioButtonElementWidth Radio Button Element Width CMTYPE_FLOAT 22

CMPanelButtons extends CMPanel

File: CMPanelButtons
ButtonContentClassName Button Content Class Name CMTYPE_STRING CM_ButtonContent

Object Functions

Inherited From: CMPanel
ReturnsFunctionThrows
Thecontent AddButtonAndContentPanel(ContentID, Name, ToolTip)
The AddButton(ContentID, Name, ToolTip)
SelectButton(ContentID)
GetTabContentElement(TabName)
RemoveButton(TabName)

CMPanelFooter extends CMPanel

File: CMPanelFooter
CoordinateUnits Coordinate Units CMTYPE_INDEXES CMUtilities.CoordinateUnitOptions, Default:CMUtilities.COORDINATE_UNITS_DMS CMUtilities.COORDINATE_UNITS_DMS Sets the units for the coordinates that appear in the footer Credits Credits CMTYPE_STRING CreditsClassName CreditsClassName CMTYPE_STRING CM_Credits SRSClassName SRSClassName CMTYPE_STRING CM_Credits

CMPanelLayerList extends CMPanel

File: CMPanelLayerList
LayerListItemHeight Layer List Item Height CMTYPE_FLOAT 28 Height, in pixels, for each item in the layer list IndentAmount Indent Amount CMTYPE_FLOAT 12 Amount to indent for each child in the list OpenCloseElementWidth Open Close Element Width CMTYPE_FLOAT 20 Not available to JavaScript from CSS so these are replicated here CheckBoxElementWidth Check Box Element Width CMTYPE_FLOAT 24 IconElementWidth Icon Element Width CMTYPE_FLOAT 20 NameElementWidth Name Element Width CMTYPE_FLOAT 200

CMPanelSearch extends CMPanel

File: CMPanelSearch

CMPanelTool extends CMPanel

File: CMPanelTool
ToolClassName ToolEditClassName CMTYPE_STRING CM_Tool ToolEditID ToolEditID CMTYPE_STRING CM_ToolEdit ToolInfoID ToolInfoID CMTYPE_STRING CM_ToolInfo ToolPanID ToolPanID CMTYPE_STRING CM_ToolPan ZoomInButtonID ZoomInButtonID CMTYPE_STRING CMZoomIn_0 HomeButtonID HomeButtonID CMTYPE_STRING CMHome_0 ZoomOutButtonID ZoomOutButtonID CMTYPE_STRING CMZoomOut_0

Object Functions

Inherited From: CMPanel
ReturnsFunctionThrows
AddToolWithHandlerAndSVG(ToolID, UnselectedFilePath, SelectedFilePath, ToolTip, TheFunction, AdditionalInfo)
RemoveTool(ToolID)
SelectTool()

CMProj4Grid extends CMProjector

File: CMProj4Grid

Settings Group: Proj4Grid

Setting Name Type Options Default Comments
URL URL CMTYPE_STRING /Archive/ProjectionGrids/aea/lat_0=40/lat_1=60/Step=10/BB=-180_-90_180_90/

Settings Group: Projection

Setting Name Type Options Default Comments
LongitudeOfOrigin Longitude Of Origin CMTYPE_FLOAT 0
DynamicBoundingBox Dynamic Bounding Box CMTYPE_BOUNDS null

Object Functions

Inherited From: CMProjector
ReturnsFunctionThrows
an GetClippingPolys()
RequestGrid()
RequestBackProjectionGrid()

CMProj4WebService extends CMProj4Grid

File: CMProj4WebService

Settings Group: Projection

Setting Name Type Options Default Comments
LongitudeOfOrigin Longitude Of Origin CMTYPE_FLOAT 0 CMProj4Grid that is used to dynamically move the Longitude of origin. This is not sent to the web service and is handled in CMProj4Grid.
DynamicBoundingBox Dynamic Bounding Box CMTYPE_BOUNDS null
lon_0 Longitude Of Origin CMTYPE_FLOAT null, Min:-180,Max:180 typically, longitude of origin
lon_1 First Meridian CMTYPE_FLOAT -40, Min:-180,Max:180 first longitude
lon_2 Second Merdian CMTYPE_FLOAT 40, Min:-180,Max:180 second longitude
lonc Lonigidude of central point CMTYPE_FLOAT 0, Min:-180,Max:180
lat_ts Latitude Of True Scale CMTYPE_FLOAT 0, Min:-90,Max:90 latitude of true scale
lat_0 Latitude Of Origin CMTYPE_FLOAT 0, Min:-90,Max:90 typically, latitude of origin
lat_1 First Parallel CMTYPE_FLOAT 20, Min:-90,Max:90 first latitude for conics
lat_2 Second Parallel CMTYPE_FLOAT 40, Min:-90,Max:90 second latitude for conics
h Height of Satellite above the earth CMTYPE_FLOAT 35785831.0 , Min:1,Max:1000000000
n n CMTYPE_FLOAT 2 , Min:1,Max:5 undocumented
m m CMTYPE_FLOAT 3 , Min:1,Max:5 undocumented
M M CMTYPE_FLOAT 0.5 , Min:0.001,Max:5 greater than 0
W W CMTYPE_FLOAT 1 , Min:0.001,Max:5 greater than 0
south South CMTYPE_BOOLEAN false
lsat Satellite CMTYPE_ENUMERATED 1, 2, 3, 4, 5 1
path Path CMTYPE_INTEGER 1, Min:1,Max:253
alpha Alpha CMTYPE_FLOAT 1, Min:0,Max:360 angle of rotational pole
tilt Tilt CMTYPE_FLOAT 1, Min:0,Max:360
azi Azimuth CMTYPE_FLOAT 1, Min:0,Max:360
o_lat_p Latitude of New Pole CMTYPE_FLOAT 90, Min:-90,Max:90 moves latitude for oblique projections
BoundingBox BoundingBox CMTYPE_BOUNDS null clip bounding box for projection grids
Type Type CMTYPE_STRING Cylindrical
Method Method CMTYPE_STRING Robinson Robinson only those projection methods that work well are exposed at this time.
DegreeSpacing DegreeSpacing CMTYPE_INTEGER 10
DistanceDistortionMax DistanceDistortionMax CMTYPE_FLOAT null

Static Functions

ReturnsFunctionThrows
GetProjectionCodeFromProjectionName()
GetProjectionIndexFromProjectionCode()
GetProjectionIndexFromSettingsName()
GetControlInformation()
GetPreferedGeographicBounds()
GetProjectionInfoFromProjectionCode()

CMProjector extends CMBase

File: CMProjector

Static Functions

ReturnsFunctionThrows
angle DegreesToRadians(-)
angle RadiansToDegrees(-)

Object Functions

Inherited From: CMBase
ReturnsFunctionThrows
ProjectToGeographic(Easting, Northing, Elevation)
ProjectFromGeographic(Longitude, Latitude, Elevation)
GetClippingPolys()
An ProjectPolyFromGeographic(ThePoly)
An ProjectAreaFromGeographic(TheArea, TheType)
An ProjectRegionFromGeographic(TheRegion, TheType)
An ProjectRegionsFromGeographic(TheRegion, TheType)

CMProjectorUTM extends CMProjector

File: CMProjectorUTM

Settings Group: UTM

Setting Name Type Options Default Comments
Datum Datum CMTYPE_ENUMERATED CMProjector.WGS_84, CMProjector.NAD_27, CMProjector.NAD_83 CMProjector.WGS_84 Datum for the projection
Zone Zone CMTYPE_INTEGER 10 The UTM Zone (could be north or south)
South South CMTYPE_BOOLEAN false true for southern hemisphere

Static Functions

ReturnsFunctionThrows
GetUTMZoneFromLonLat()
GetSouthFromLat()
GetUTMZoneFromEPSG()
GetSouthFromEPSG()
GetEPSGFromUTM()

CMProjectorWebMercator extends CMProjector

File: CMProjectorWebMercator

CMScaleBar extends CMItem

File: CMScaleBar

Enumerated Types

    CMScaleBar.UNITS_ISO=0 - meters, kilometers
    CMScaleBar.UNITS_ENGLISH=1 - feet, miles

Settings Group: ScaleBar

Setting Name Type Options Default Comments
ClassName Class Name CMTYPE_STRING CM_ScaleBar

Settings Group: UnitText

Setting Name Type Options Default Comments
Text Text CMTYPE_STRING null
font Font CMTYPE_FONT 12px Arial
strokeStyle Line Style CMTYPE_CSS_STYLE rgb(0,0,0)
fillStyle Fill Style CMTYPE_CSS_STYLE rgb(255,255,255)
lineWidth Width CMTYPE_INTEGER 1
lineCap Line Cap CMTYPE_ENUMERATED butt, round, square round
lineJoin Line Join CMTYPE_ENUMERATED bevel, round, miter round

Settings Group: Factors

Setting Name Type Options Default Comments
UnitFontHeightFactor Corner Width CMTYPE_FLOAT 0.35 proportion of the height of the scale bar used for units
LabelFontHeightFactor Corner Height CMTYPE_FLOAT 0.3
ScaleBarHeightFactor Corner Height CMTYPE_FLOAT 0.3
ScaleBarBaseLineFromBottomFactor Corner Height CMTYPE_FLOAT 0.2 proportional distance of the bottom of the scale bar from the bottom of the background
Units Units CMTYPE_INDEXES 0 CMScaleBar.UnitOptions[0]
Margin Margin CMTYPE_FLOAT 4 margin around the scale bar

ScaleBarStyle Scale Bar Style CMTYPE_OBJECT style of the actual bar BoxStyle Box Style CMTYPE_OBJECT style of the actual bar

CMScene extends CMItem

File: CMScene
Name Name CMTYPE_STRING Name that appears in the item and layer lists Open Open CMTYPE_BOOLEAN false true if the object is open in the editor tree Status Status CMTYPE_INDEXES CMSTATUS_OPTIONS, Default:CMSTATUS_SELECTABLE CMSTATUS_SELECTABLE How the item appears to the user and how the user can CurrentTool Current Tool CMTYPE_INDEXES CMToolHandler.TOOL_OPTIONS, Default:CMToolHandler.TOOL_SELECT CMToolHandler.TOOL_SELECT How the item appears to the user and how the user can interact Style Fill Style CMTYPE_CSS_STYLE rgb(200,200,200)

Object Functions

Inherited From: CMItem
ReturnsFunctionThrows
SetToolHandler(NewToolHandler)
GetToolHandler()
NewTool GetTool()
Resize(TheView)
Repaint(TheView)
GetBounds()

CMTile

File: CMTile

Object Functions

ReturnsFunctionThrows
PaintTile()
AddToFeatureBounds()
SetPaintTileInfo()
HasData()
SetData()

CMTileOpenFormat extends CMTile

File: CMTileOpenFormat

Object Functions

Inherited From: CMTile
ReturnsFunctionThrows
GetData()

CMToolHandler

File: CMToolHandler

Enumerated Types

    CMToolHandler.TOOL_NONE=0 - no tool (disables moving the background)
    CMToolHandler.TOOL_HAND=1 - pan the map (the hand)
    CMToolHandler.TOOL_INFO=2 - click to get information on features ("I" tool)
    CMToolHandler.TOOL_EDIT=3 - user is editing existing spatial data (not used)
    CMToolHandler.TOOL_ADD=4 - user is adding data (not used)
    CMToolHandler.TOOL_SELECT=5 - combined with INFO on the web (arrow tool)
    CMToolHandler.TOOL_OPTIONS=[CMToolHandler.TOOL_NONE,CMToolHandler.TOOL_HAND,CMToolHandler.TOOL_INFO,CMToolHandler.TOOL_EDIT,CMToolHandler.TOOL_ADD,CMToolHandler.TOOL_SELECT]

CMUtilities

File: CMUtilities

Enumerated Types

    CMUtilities.COORDINATE_UNITS_DD=0
    CMUtilities.COORDINATE_UNITS_DMS=1
    CMUtilities.COORDINATE_UNITS_METERS=2
    CMUtilities.COORDINATE_UNITS_FEET=3
    CMUtilities.COORDINATE_UNITS_PIXELS=4 - displays the pixel level coordinates for debugging
    CMUtilities.COORDINATE_UNITS_ZOOM=5 - displays the zoom level for debugging

Static Functions

ReturnsFunctionThrows
AbsolutePosition(TheElement, Left, Top, Width, Height)
Coordinate GetElementCoordinate()
Colors GetColorsFromArrays(FeatureValues, TheColors, Intervals)
LegendElement AddLegend(TheCanvasElement, TheColors, LegendLabels, X,Y,Width,Height)
Mean GetMean(TheArray)
StdDev GetStdDev(TheArray)
{Min,Max} GetMinMax(TheArray)
{Min,Max,Bins,Labels} GetHistogram(TheArray, NumBins)
Quantiles GetQuantiles(TheHistogram, NumGroups)
FlippedArray FlipArray(TheArray)
Sort(TheArray)
InsertIntoSortedArray(TheArray, TheValue, AllowDuplicates)
Flag ArraysEqual(TheArray1, TheArray2)
CoordinateArray GetRegularPolygon(NumPoints, Size, CenterX, CenterY, StartAngle)
CoordinateArray GetStar(NumPoints, Size, CenterX, CenterY, StartAngle)
TheElement CreateLabelControl(Text, Position, X, Y)
TheElement CreateInfoWindow(ID, Left, Top, Width, Height, Text)
LineIndex InPolyline(RefX, RefY, TheCoordinates, Tolerance)
InPolylinePoint()
Flag BoundsIncludes(ExteriorBounds, InteriorBounds)
Flag BoundsOverlap(Bounds1, Bounds2)
ClonedBounds CloneBounds(TheBounds)
TheBounds AddToBounds(TheBounds, NewBounds)
ExpandBounds(TheBounds, Amount)
A IntersectBounds(TheBounds1, TheBounds2)
true InBounds(TheBounds, RefX,RefY)
Flag InsideAPolygon(RefX, RefY, Xs, Ys, NumPoints)
Bounds GetPolygonBounds(Xs, Ys, NumPoints)
Distance GetLength(X1,Y1,X2,Y2)
Result IntersectionOfTwoLineSegments(X1,Y1,X2,Y2)
Seconds GetSeconds()
ClonedObject Clone()
CoordinateString GetCoordinateString(-, -, -, -, -)
QuadArea GetQuadArea(Xs, Ys)
Angle GetAngleBetweenLineSegments(X1,Y1,X2,Y2,X3,Y3)
Angle GetAngleBetweenVectors(X1,Y1,X2,Y2)
Flag IsValid(Value)
RemoveElementsChildren(TheElement)
Index IndexOfChildInElement(Child, Parent)
RemoveChildElement(Element, Parent)
ContentsElement(Parent, TargetChild)

CMUtilityBezier

File: CMUtilityBezier

Static Functions

ReturnsFunctionThrows
GetCurveWithArrow(Xs, Ys, BarbWidth, BarbLength, ShaftWidth, HeadLength)

CMUtilityRegion

File: CMUtilityRegion

Static Functions

ReturnsFunctionThrows
GetTurfObjectFromArea()
Region IntersectRegions()

CMView extends CMItem

File: CMView

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

Inherited From: CMItem
ReturnsFunctionThrows
AddMapElement(TheElement)
GetCanvasElement()
SaveStyle()
RestoreStyle()
Paint()