CanvasMap
Getting Started Tutorials 3D Reference

Graticules

Graticules are currently only supported for spherical projections in CanvasMap 3D. The Spherical example includes graticules.

CM3LayerGraticule

You can create an object from the CM3LayerGraticule class and then add it to a Geo that has a spherical projection to add graticules. Note that the text on the graticules takes a while to render and is relatively complex. Changes in the font and extrusion can impact this. Below is the code from the spherical projection example that adds the graticules.

var TheLayerGraticule=new CM3LayerGraticule();
TheLayerGraticule.SetSetting("Item","Name","Graticules");

TheLayerGraticule.SetSetting("Text3D","size",200);
TheLayerGraticule.SetSetting("Text3D","color",0xffffff);
TheLayerGraticule.SetSetting("Item","Status",CMSTATUS_VISIBLE);

TheLayerGraticule.SetSetting("Text3D","GlobalFontIndex",1);
TheLayerGraticule.SetSetting("Style","strokeStyle","rgb(255,255,255)");
TheLayerGraticule.SetSetting("Graticule3D","LineWidth",2);
TheLayerGraticule.SetSetting("Graticule3D","HeightAboveSeaLevel",20);
TheLayerGraticule.SetSetting("Graticule","DegreeSpacing",15);
TheLayerGraticule.SetSetting("Graticule","TextSpacing",30);

TheMainContainer.AddLayer(TheLayerGraticule);