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

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

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:[1,1] x,y, and z values to offset the item
Rotations Rotation Vector CMTYPE_VECTOR null,Initial:[1,1] 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 -100000
MaxZoom Max Zoom CMTYPE_FLOAT 100000
MaxBounds Max Bounds CMTYPE_BOUNDS null

Object Functions

Inherited From: CMView
ReturnsFunctionThrows
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)
ZoomLevel GetZoomLevel()
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

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 GetSettingGroup(Group, Default)
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 - have not started a load yet
    CMDataset.LOAD_STATUS_LOADING=2 - waiting for element to load
    CMDataset.LOAD_STATUS_LOADED=3 - element had loaded and is ready to go
    CMDataset.LOAD_STATUS_PENDING=4 - element is waiting in the que
    CMDataset.LOAD_STATUS_CANCELED=5 - request was canceled, probably from the user changing the zoom level

    CMDataset.REQUEST_TYPE_IMAGE=1 - img element with a "src" attribute (jjg - not sure this is being used )

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

Object Functions

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

CMDatasetPyramid extends CMDataset

File: CMDatasetPyramid

CMDatasetPyramidOpenFormat extends CMDataset

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()
AddPoint()
AddPoly()
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_FLOATING=18

    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

CMDialog

File: CMDialog

Static Functions

ReturnsFunctionThrows
AddLabelToPanel(Text, XOffset, YPostion)
AddParagraphToPanel(Text, XOffset, YPostion, Width, Height)
AddColorControlToPanel(Name, XOffset, YPostion, Value)
AddButtonControlToPanel(Name, XOffset, YPostion)
AddSliderControlToPanel(Name, XOffset, YPostion, Min, Max, Value)
AddCheckBoxControlToPanel(Name, XOffset, YPostion, Value)
AddTextControlToPanel(Name, XOffset, YPostion, Value)
AddRadioControlToPanel(Name, XOffset, YPostion, Values, Selected)
AddSelectControlToPanel(Name, XOffset, YPostion, Values, Selected)
GetRGBAFromControls(FillColorControl, FillTransparencyControl)

Object Functions

ReturnsFunctionThrows
SetVisible(Text, XOffset, YPostion)
AddLabel(Text, XOffset, YPostion)
AddParagraph(Text, XOffset, YPostion, Width, Height)
AddColorControl(Name, XOffset, YPostion, Value)
AddButtonControl(Name, XOffset, YPostion)
AddSliderControl(Name, XOffset, YPostion, Min, Max, Value)
AddCheckBoxControl(Name, XOffset, YPostion, Value)
AddTextControl(Name, XOffset, YPostion, Value)
AddRadioControl(Name, XOffset, YPostion, Values, Selected)
AddSelectControl(Name, XOffset, YPostion, Values, Selected)

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:[1,1] x,y, and z values to offset the item
Rotations Rotation Vector CMTYPE_VECTOR null,Initial:[1,1] 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 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 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 TextStyle Text Style CMTYPE_OBJECT null standard HTML 5 settings except the defaults may change

Object Functions

Inherited From: CMBase
ReturnsFunctionThrows
GetBounds()

CMItemHTML

File: CMItemHTML

CMItemPoly extends CMItem

File: CMItemPoly

Object Functions

Inherited From: CMItem
ReturnsFunctionThrows
SetControlPoints()

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

Object Functions

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

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, Default:CMDataset.GEOJSON CMDataset.GEOJSON Type of data to load.
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)
SetMouseOverFeature(NewFeatureIndex)
RequestData()
SetData(TheData, DataSetType)
TheDataset HaveDataset()
SetDataset(NewDataset)

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

CMLayerBackgrounds extends CMLayer

File: CMLayerList

Object Functions

Inherited From: CMLayer
ReturnsFunctionThrows
SetSelectedBackgroundIndex(BackgroundIndex)

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

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
MobileSupported Mobile Supported CMTYPE_BOOLEAN false true to enable jestures on phones and pads
Resize Resize CMTYPE_BOOLEAN false true to have the map automatically resize when the window is resized
ImageFolder Image Folder CMTYPE_STRING ../Images/ 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 MainContainerElementID CMTYPE_STRING CM_MapContainer
MainContainerClassName MainContainerClassName CMTYPE_STRING CM_MapContainer
CanvasContainerID CanvasContainerID CMTYPE_STRING CM_CanvasContainer
CanvasContainerClassName CanvasContainerClassName CMTYPE_STRING CM_CanvasContainer
CanvasID CanvasID CMTYPE_STRING CM_Canvas
CanvasClassName CanvasClassName CMTYPE_STRING CM_Canvas
PanelFooterID Footer Panel ID CMTYPE_STRING CM_MapFooter
PanelToolID Tool Panel ID CMTYPE_STRING CM_ToolContainer
PanelButtonsID Button Panel ID CMTYPE_STRING CM_PanelButtons
ControlsLocation ControlsLocation CMTYPE_ENUMERATED "None", "MainContainer", "CanvasContainer" MainContainer
TabContainerID TabContainerID CMTYPE_STRING CM_Editor tab container for the editor

Static Functions

ReturnsFunctionThrows
SetPopupWindow(NewPopupWindow)
HidePopupWindows()

Object Functions

Inherited From: CMPanel
ReturnsFunctionThrows
SetCoordinateUnits(CoordinateUnits)
Initialize(TheView)
TheScene GetScene()
TheView GetView()
SetProjector(TheProjector)
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

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 ClassName Class Name CMTYPE_STRING Name that appears to the user for the object CSS CMTYPE_OBJECT

CMPanelBackgrounds extends CMPanel

File: CMPanelBackgrounds

CMPanelButtons extends CMPanel

File: CMPanelButtons
ButtonClassName ButtonClassName CMTYPE_STRING CM_ButtonContent LayerListID LayerListID CMTYPE_STRING CM_LayerList BackgroundListID BackgroundListID CMTYPE_STRING CM_BackgroundList SearchPanelID SearchPanelID CMTYPE_STRING CM_SearchPanel MainContainerStyle CanvasContainerStyle

Object Functions

Inherited From: CMPanel
ReturnsFunctionThrows
The AddTab(ContentID, Name, ToolTip)
SelectTab(TheTabButton)
GetTabContentElement(TabName)
RemoveTab(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

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
AddTool(ToolID, UnselectedFilePath, SelectedFilePath, ToolTip, TheFunction, AdditionalInfo)
AddToolWithHandler(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 http://gsp.humboldt.edu/Archive/ProjectionGrids/robin/5_5/-179_179_-90_90/90.js gsp.humboldt.edu/Archive/ProjectionGrids/robin/5_5/-179_179_-90_90/90.js" },
LongitudeOfOrigin Longitude Of Origin CMTYPE_FLOATING 0

Object Functions

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

CMProj4WebService extends CMProj4Grid

File: CMProj4WebService

Settings Group: Projection

Setting Name Type Options Default Comments
LonMin LonMin CMTYPE_FLOAT 0, Min:-180,Max:180
LonMax LonMax CMTYPE_FLOAT 0, Min:-180,Max:180
LatMin LatMin CMTYPE_FLOAT 0, Min:-90,Max:90
LatMax LatMax CMTYPE_FLOAT 0, Min:-90,Max:90
lon_0 Longitude Of Origin CMTYPE_FLOAT 0, 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
Type Type CMTYPE_STRING Cylindrical
Method Method CMTYPE_STRING Robinson Robinson only those projection methods that work well are exposed at this time.
LongitudeStep Longitude Step CMTYPE_INTEGER 5
LatitudeStep Latitude Step CMTYPE_INTEGER 5

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)

CMProjectorGoogleMaps extends CMProjector

File: CMProjectorGoogleMaps

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

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 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
LoadTile()
PaintTile()
AddToFeatureBounds()
SetPaintTileInfo()
SetData()

CMTileOpenFormat extends CMTile

File: CMTileOpenFormat

Object Functions

Inherited From: CMTile
ReturnsFunctionThrows
SetPaintTileInfo()

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)
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)

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
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
ReturnsFunctionThrows
AddMapElement(TheElement)
GetCanvasElement()
SaveStyle()
RestoreStyle()
Paint()