JSEditTerrain
API for setting terrain editing functions within the map.
Created with the Module.getEditTerrain API.
var editTerrain = Module.getEditTerrain();
clear() → boolean
Resets terrain editing.
Sample
Refer to function clearEditTerrain.
create(coordinates, height, angle) → boolean
Performs terrain cut and fill based on the analysis area.
coordinates
List of latitude and longitude coordinates for the cut and fill analysis area.
height
number
Reference height for cut and fill (Reference: sea level, in meters)
angle
number
Slope angle for cut and fill (in degrees)
Sample
Refer to function createEditTerrain.
createBoundary(min, max, height, angle) → boolean
Performs terrain cut and fill based on the analysis range.
height
number
Reference height for cut and fill (Reference: sea level, in meters)
angle
number
Slope angle for cut and fill (in degrees)
Sample
Refer to function createEditTerrain.
setEditFaceColor(data, width, height, type) → boolean
Sets the texture for the ground and slope surfaces during terrain cut and fill.
The data variable is based on a binary array of Uint8Array.
data
object
Image binary data.
width
number
Width of the image.
height
number
Height of the image.
type
boolean
Differentiates between ground and slope (true: ground, false: slope)
Sample
Refer to function createEditTerrain.
Last updated