When you are working with a georeferenced view and data, it is often convenient to display a grid for quick orientation. You can add this grid to the view as a layer, using a layer builder.
Program: Creating a grid layer shows how to add a grid layer to a view.
LuciadLightspeed offers the following grid layer builders:
TLspLonLatGridLayerBuildercreates a latitude-longitude grid formed by evenly spaced meridians and parallels. It allows locating geographically referenced data immediately. This grid is used in all of the Lightspeed view samples that are shipped with LuciadLightspeed. If necessary, you can change the style of the grid lines and labels using the
ILspStylerimplementation for lon-lat grids,
TLspLonLatGridStyler. You can also configure the spacing between the grid lines. Consult the Javadoc
TLspLonLatGridLayerBuilderfor more information about how to do this.
TLspGeorefGridLayerBuildercreates a Georef grid. It is similar to the latitude-longitude grid, but uses a simpler and more concise notation. If necessary, you can change what grid lines and labels are displayed and how they are visualized, by configuring a
TLspGeorefGridStyleobject on the layer builder. The Georef grid is demonstrated in the grid sample.
TLspXYGridLayerBuildercreates a Cartesian grid. It is typically defined in the world reference of the view, which results in an axis-aligned grid.
In addition, the Defense Symbology component adds support for several military grids.