CanvasMap
Getting Started Tutorials 3D Reference

Class CM3LayerGraticule extends CMLayerGraticule

CM3LayerGraticule

This class required a level of complexity beyond what I initially expected.
The problem is that we have to:
- Draw graticule lines based on the zoom level, projection, and area viewed
- Paint coordinates along the border based on where the graticules intersect with the border
- Paint coordinates along the outside of the graticule grid if it is visible (i.e. does not
intersect with the border.

Graticles are made visible by setting the overall style to transparent. The graticules must be drawn to get the intersections for the exterior and border


Copyright (C) 2020, Humboldt State University, Jim Graham

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see
.

Settings Group: Graticule3D

Setting Name Type Options Default Comments
LineWidth Line Width CMTYPE_FLOAT 20
HeightAboveSeaLevel Height Above Sea Level CMTYPE_FLOAT 20
LabelHeightAboveSeaLevel Height Above Sea Level CMTYPE_FLOAT 40
LongitudePosition Longitude Position CMTYPE_ENUMERATED CMLABEL_LOCATIONS, Default:null null Position of the longitude text, null for centered
LongitudeXOffset Longitude X Offset CMTYPE_FLOAT 50
LongitudeYOffset Longitude Y Offset CMTYPE_FLOAT 0
LatitudePosition Latitude Position CMTYPE_INDEXES CMLABEL_LOCATIONS, Default:CMLABEL_TOP_RIGHT CMLABEL_TOP_RIGHT
LatitudeXOffset Latitude X Offset CMTYPE_FLOAT 0
LatitudeYOffset Latitude Y Offset CMTYPE_FLOAT 50

Settings Group: Text3D

Setting Name Type Options Default Comments
Color Color CMTYPE_COLOR 0xffffff size of the text
opacity Opacity CMTYPE_FLOAT 1 1 for opaque, 0 for tranparent
size Size CMTYPE_FLOAT 1 size of the text
HaloSize Halo Size CMTYPE_FLOAT 10 size of the text
GlobalFontIndex Global Font Index CMTYPE_INTEGER 2 global font to use
height height CMTYPE_FLOAT 2 amount to extrude the object
curveSegments curveSegments CMTYPE_FLOAT 4 number of points on the curve
bevelEnabled bevelEnabled CMTYPE_BOOLEAN true beveled instead of 90 degree change, keep true for good looking text
bevelSegments bevelSegments CMTYPE_FLOAT 3 number of bevel layers (more makes a smoother bevel but draws slower
bevelSize bevelSize CMTYPE_FLOAT 0.1 width of bevel (distance from shape outline), keep > 0
bevelThickness bevelThickness CMTYPE_FLOAT 0.1 how deep the bevel goes into the extrusion ,keep > 0

Color Color CMTYPE_COLOR rgb(128,128,128) must be set before the OGL object is created (or recreate on set) opacity opacity CMTYPE_FLOAT 1 must be set before the OGL object is created (or recreate on set)

Object Functions

Inherited From: CMLayerGraticule
ReturnsFunctionThrows
SetLineMaterial()

Object Functions

SetLineMaterial()

Set a custom material for the line