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: CM2LayerSettings 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 |
Object Functions
Inherited From: CMLayer
| Returns | Function | Throws |
|---|---|---|
| SetIconImage(TheURL, OffsetX, OffsetY) | ||
| SetFeatureIconImage(TheURL, OffsetX, OffsetY) |
CM2View extends CMView
File: CM2ViewSettings 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
| Returns | Function | Throws |
|---|---|---|
| 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: CMBaseStatic Functions
| Returns | Function | Throws |
|---|---|---|
| UniqueNumber | GetUniqueNumber() | |
| Selected | SetSelected() |
Object Functions
| Returns | Function | Throws |
|---|---|---|
| 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: CMControlPointsCMDataset extends CMBase
File: CMDatasetEnumerated Types
CMDataset.GEOJSON=1CMDataset.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
| Returns | Function | Throws |
|---|---|---|
| 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: CMDatasetGeoJSONObject Functions
Inherited From: CMDatasetVector
| Returns | Function | Throws |
|---|---|---|
| SetGeoJSONFeatures(-) | ||
| SetGeoJSON(TheGeoJSONObject, ZoomToBounds) |
CMDatasetPyramid extends CMDataset
File: CMDatasetPyramidCMDatasetPyramidOpenFormat extends CMDataset
File: CMDatasetPyramidOpenFormatCMDatasetRaster extends CMDataset
File: CMDatasetRasterObject Functions
Inherited From: CMDataset
| Returns | Function | Throws |
|---|---|---|
| SetBounds(NewBounds) | ||
| Bounds | GetBounds() | |
| GetSampleFromRef() | ||
| GetSampleFromRef_PixelsInCorners() | ||
| GetPathArray() |
CMDatasetVector extends CMDataset
File: CMDatasetVectorObject Functions
Inherited From: CMDataset
| Returns | Function | Throws |
|---|---|---|
| SetBounds(NewBounds) | ||
| Bounds | GetBounds() | |
| Bounds | GetFeatureBounds() | |
| [FeatureIndex,AreaIndex,PolyIndex,PointIndex] | GetInChain() | |
| AddPoint() | ||
| AddPoly() | ||
| SetPosition() |
CMDefs
File: CMDefsEnumerated 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: CMDialogStatic Functions
| Returns | Function | Throws |
|---|---|---|
| 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
| Returns | Function | Throws |
|---|---|---|
| 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: CMGeoObject Functions
Inherited From: CMItem
| Returns | Function | Throws |
|---|---|---|
| SetProjector(TheProjector) | ||
| Paint(TheView) |
CMItem extends CMBase
File: CMItemSettings 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 |
Object Functions
Inherited From: CMBase
| Returns | Function | Throws |
|---|---|---|
| GetBounds() |
CMItemHTML
File: CMItemHTMLCMItemPoly extends CMItem
File: CMItemPolyObject Functions
Inherited From: CMItem
| Returns | Function | Throws |
|---|---|---|
| SetControlPoints() |
CMItemPolyArrow extends CMItemPoly
File: CMItemPolyArrowSettings 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: CMItemRectCMItemRoundedRect extends CMItemRect
File: CMItemRoundedRectSettings Group: RoundedRectangle
| Setting | Name | Type | Options | Default | Comments |
|---|---|---|---|---|---|
| RoundedCornerWidth | Corner Width | CMTYPE_FLOAT | 3 | ||
| RoundedCornerHeight | Corner Height | CMTYPE_FLOAT | 3 |
CMLayer extends CMItem
File: CMLayerSettings 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
| Returns | Function | Throws |
|---|---|---|
| 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: CMLayerDatasetSettings 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
| Returns | Function | Throws |
|---|---|---|
| SetBounds(NewBounds) | ||
| Bounds | GetBounds() | |
| SetSelectedFeature(NewFeatureIndex) | ||
| SetMouseOverFeature(NewFeatureIndex) | ||
| RequestData() | ||
| SetData(TheData, DataSetType) | ||
| TheDataset | HaveDataset() | |
| SetDataset(NewDataset) |
CMLayerGraticule extends CM2Layer
File: CMLayerGraticuleSettings 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: CMLayerGridSettings 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
| Returns | Function | Throws |
|---|---|---|
| RequestData(URL, DataSetType) |
CMLayerItems extends CM2Layer
File: CMLayerItemsCMLayerList extends CMLayer
File: CMLayerListCMLayerBackgrounds extends CMLayer
File: CMLayerListObject Functions
Inherited From: CMLayer
| Returns | Function | Throws |
|---|---|---|
| SetSelectedBackgroundIndex(BackgroundIndex) |
CMLayerRaster extends CM2Layer
File: CMLayerRasterSettings 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: CMMainContainerSettings 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
| Returns | Function | Throws |
|---|---|---|
| SetPopupWindow(NewPopupWindow) | ||
| HidePopupWindows() |
Object Functions
Inherited From: CMPanel
| Returns | Function | Throws |
|---|---|---|
| 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: CMNorthArrowCMPanel extends CMBase
File: CMPanelCMPanelBackgrounds extends CMPanel
File: CMPanelBackgroundsCMPanelButtons extends CMPanel
File: CMPanelButtonsObject Functions
Inherited From: CMPanel
| Returns | Function | Throws |
|---|---|---|
| The | AddTab(ContentID, Name, ToolTip) | |
| SelectTab(TheTabButton) | ||
| GetTabContentElement(TabName) | ||
| RemoveTab(TabName) |
CMPanelFooter extends CMPanel
File: CMPanelFooterCMPanelLayerList extends CMPanel
File: CMPanelLayerListCMPanelSearch extends CMPanel
File: CMPanelSearchCMPanelTool extends CMPanel
File: CMPanelToolObject Functions
Inherited From: CMPanel
| Returns | Function | Throws |
|---|---|---|
| AddTool(ToolID, UnselectedFilePath, SelectedFilePath, ToolTip, TheFunction, AdditionalInfo) | ||
| AddToolWithHandler(ToolID, UnselectedFilePath, SelectedFilePath, ToolTip, TheFunction, AdditionalInfo) | ||
| RemoveTool(ToolID) | ||
| SelectTool() |
CMProj4Grid extends CMProjector
File: CMProj4GridSettings 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
| Returns | Function | Throws |
|---|---|---|
| an | GetClippingPolys() | |
| RequestGrid() | ||
| GetProectionBounds() |
CMProj4WebService extends CMProj4Grid
File: CMProj4WebServiceSettings 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
CMProjector extends CMBase
File: CMProjectorStatic Functions
| Returns | Function | Throws |
|---|---|---|
| angle | DegreesToRadians(-) | |
| angle | RadiansToDegrees(-) |
Object Functions
Inherited From: CMBase
| Returns | Function | Throws |
|---|---|---|
| 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: CMProjectorGoogleMapsCMProjectorUTM extends CMProjector
File: CMProjectorUTMSettings 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: CMProjectorWebMercatorCMScaleBar extends CMItem
File: CMScaleBarEnumerated Types
CMScaleBar.UNITS_ISO=0 - meters, kilometersCMScaleBar.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 |
CMScene extends CMItem
File: CMSceneObject Functions
Inherited From: CMItem
| Returns | Function | Throws |
|---|---|---|
| SetToolHandler(NewToolHandler) | ||
| GetToolHandler() | ||
| NewTool | GetTool() | |
| Resize(TheView) | ||
| Repaint(TheView) | ||
| GetBounds() |
CMTile
File: CMTileObject Functions
| Returns | Function | Throws |
|---|---|---|
| LoadTile() | ||
| PaintTile() | ||
| AddToFeatureBounds() | ||
| SetPaintTileInfo() | ||
| SetData() |
CMTileOpenFormat extends CMTile
File: CMTileOpenFormatObject Functions
Inherited From: CMTile
| Returns | Function | Throws |
|---|---|---|
| SetPaintTileInfo() |
CMToolHandler
File: CMToolHandlerEnumerated 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: CMUtilitiesEnumerated Types
CMUtilities.COORDINATE_UNITS_DD=0CMUtilities.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
| Returns | Function | Throws |
|---|---|---|
| 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: CMUtilityBezierStatic Functions
| Returns | Function | Throws |
|---|---|---|
| GetCurveWithArrow(Xs, Ys, BarbWidth, BarbLength, ShaftWidth, HeadLength) |
CMView extends CMItem
File: CMViewSettings 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 |
Object Functions
Inherited From: CMItem
| Returns | Function | Throws |
|---|---|---|
| AddMapElement(TheElement) | ||
| GetCanvasElement() | ||
| SaveStyle() | ||
| RestoreStyle() | ||
| Paint() |