CanvasMap
Getting Started Tutorials 3D Reference

Class CM2Layer extends CMLayer

CM2Layer
This class is the base class for all other layers. This class contains functions and properties for feature and raster based
classes. This is because the CMLayerPyramid supports both raster and vector data. This also may be a trend with data formats like KML.

Adds:
- Zooming: Min, Max, To Bounds
- Metadata
- InfoText popup balloon
- Painting Marks, labels, and icon images for point data
- Mouse over and selected styles
- Settings for features
- Getting and setting attributes
- Bounds of features

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)

Object Functions

SetIconImage(TheURL, OffsetX, OffsetY)

Icon for point features

Parameters:
    TheURL - the URL of the image to use for all features
    OffsetX - horizontal offset in pixels to go from the upper left of the image to the hot spot
    OffsetY - vertical offset in pixels to go from the upper left of the image to the hot spot

SetFeatureIconImage(TheURL, OffsetX, OffsetY)

Icon for point features

Parameters:
    TheURL - the URL of the image to use for all features
    OffsetX - horizontal offset in pixels to go from the upper left of the image to the hot spot
    OffsetY - vertical offset in pixels to go from the upper left of the image to the hot spot