LatLonGrid

new Cesium.LatLonGrid(viewer)

Initialize the LatLonGrid plugin.
Name Type Description
viewer Viewer The Cesium viewer object.

Members

Current Extent To Render
Render the grid.
Flag to control the visibility of the grid labels.

Methods

convertDEGToDMS(deg, lat)string

Convert degrees to DMS.
Name Type Description
deg number The degrees.
lat boolean True if it is latitude, false otherwise.
Returns:
The DMS string.
Clean up the LatLonGrid instance. This method removes all event listeners, the ResizeObserver, and the labels and polylines added to the scene by this instance. It also removes the label and polyline collections from the scene primitives. It should be called before disposing of the LatLonGrid object to ensure that all resources are released properly and no memory leaks occur.
Draw the grid.
Name Type Description
extent Object The extent of the grid to draw.

getExtentView()Object

Get the extent view.
Returns:
The extent view.

gridPrecision(dDeg)number

Get the grid precision.
Name Type Description
dDeg number The degrees.
Returns:
The precision.

makeLabel(lng, lat, text, isLat, color, meridians)

/** Make a label.
Name Type Default Description
lng number Longitude.
lat number Latitude.
text string The label text.
isLat boolean True if it is a latitude label, false otherwise.
color string white optional The color of the label. Optional, defaults to "white".
meridians boolean false optional True if drawing meridians, false otherwise. Optional, defaults to false.
Remove all polylines

screenCenterPosition()Object

Get the screen center position.
Returns:
The screen center position.
Need help? [email protected]