JSMap
API for map settings and control functions.
Creates the Module.getMap API.
var map = Module.getMap();
Function
addHeatMaps(coordinates)
Sets an array list of heatmap coordinates.
Sample
Refer to function loadHeatmapPoint
addInputPoint(lon, lat) → number
Adds a user input point.
lon
number
Longitude of the input point (in degrees).
lat
number
Latitude of the input point (in degrees).
Return
number: The cumulative number of input points after API execution.
clearHeatMap()
Initializes the heatmap.
Sample
Refer to function loadHeatmapPoint
clearInputPoint()
Initializes the list of entered coordinates.
Sample
Refer to function clearInputPoint.
clearSelectObj()
Deselects the object selection state.
clearSnowfallArea()
Initializes the snowfall effect.
getInputPointCount() → number
Returns the current number of input points.
Return
number(0 or more): The current number of input points.
number(-1): If the map has not been initialized.
getInputPointList() → Collection
Returns the list of entered coordinates.
Return
Collection: Successful return of the list of entered coordinates.
null: If there are no entered coordinates
Sample
Refer to function createPipe
getInputPoints() → JSVec3Array
Returns the list of entered coordinates.
Return
JSVec3Array: Successful return of the list of entered coordinates.
null: If there are no entered coordinates.
Sample
Refer to function createBufferPolygon.
getTerrHeight(lon, lat) → number
Returns the terrain height value at the specified location.
lon
number
Longitude.
lat
number
Latitude.
Return
Terrain height value.
0: If the DEM for the area has not been loaded.
GetPointDistance(from, to, type) → number
Returns the distance between two points.
type
boolean
Whether to consider terrain (false: straight line distance, true: distance considering terrain).
Return
The distance between two points.
0: If the engine has not been loaded properly.
getLineBuffer(coordinates, distance) → JSVec2Array
Returns the coordinates of a line buffer polygon based on the set distance.
distance
number
Distance from the line (distance from the line).
Return
JSVec2Array: Returns a list of latitude and longitude coordinates of the line buffer polygon successfully.
null: If the engine has not been loaded properly.
Sample
Refer to function createBufferPolygon
MapRender()
Refreshes the map screen.
MapToScreenPointEX(position) → JSVector2D
Returns screen coordinates for 3D map coordinates.
Return
JSVector2D: Returns screen coordinates successfully (x, y).
null: If the engine has not been loaded properly.
Sample
Refer to function displayPopUp
ScreenToMapPointEX(position) → JSVector3D
Returns 3D map coordinates for screen coordinates.
Return
JSVector3D: Returns coordinates (longitude, latitude, altitude) successfully.
null: Coordinate return failed.
Sample
Refer to function init
setCircleInputPoint(center, radius, segment)
Sets input points for a circle based on the center coordinates, radius, and segment.
radius
number
Circle radius (in meters).
segment
number
Number of segments composing the circle.
setDistance(distance)
Sets the radius distance for the heatmap.
distance
number
Heatmap radius.
Sample
Refer to function loadHeatmapPoint
setEffectDistance(max)
Set the maximum distance for flood, snow, and heatmap visualization.
max
number
Maximum visibility distance for the heatmap.
Sample
Refer to function loadHeatmapPoint
setSnowfallArea(array)
Sets the range for partial snowfall effect application.
array
Coordinates composing the range, consisting of longitude(deg), latitude(deg), and altitude(m).
setSnowfallColor(color)
Sets the color for the snowfall effect.
setTerrLODRatio(ratio)
Sets the terrain LOD update distance ratio.
<Distance for terrain update according to LOD> = \ratio * <Terrain mesh size>
ratio
number
Terrain LOD update distance ratio.
setWeight(weight)
Sets the weight for the heatmap.
weight
number
Weight for heatmap.
Sample
Refer to function loadHeatmapPoint
setFog(color, start, end, density)
Configures the fog effect.
start
number
Minimum visibility distance for fog effect application (minimum value 1).
end
number
Maximum visibility distance for fog effect application.
density
number
Fog density weight (set between 0.0 and 1.0).
Sample
Refer to function loadHeatmapPoint.
setFogEnable(type)
Sets whether to apply the fog effect.
type
boolean
Whether to apply fog effect.
Sample
Refer to function loadHeatmapPoint
setRainImageURL(url) → boolean
Sets the image path for the rain effect.
url
string
Image path for rain representation.
Return
true: Configuration successful.
false: Configuration failed.
Sample
Refer to function changeRainEffectOption.
setSnowfall(state)
Sets the output type for the snowfall effect.
When 0, the snowfall effect is disabled.
When 1, the snowfall effect is enabled (terrain texture visible).
When 2, the snowfall effect is enabled (terrain texture not visible).
state
number
Output type for the snowfall effect.
Sample
Refer to function setUseSnowEffect.
setSnowfallLevel(level) → number
Sets the amount of snowfall during the snowfall effect.
level
number
Amount of snowfall (set between 0 and 100).
Return
The set amount of snowfall.
Sample
Refer to function setUseSnowEffect.
setSnowImageURL(url) → boolean
Sets the image path for the snow effect.
url
string
Image path for snow representation.
Return
true: Configuration successful.
false: Configuration failed.
Sample
Refer to function changeRainEffectOption.
startWeather(type, size, speed) → boolean
Activates the weather representation feature.
type
number
Weather representation type (0: snow, 1: rain).
size
number
Representation intensity (0: weak, 1: normal, 2: strong).
speed
number
Representation speed (0: slow, 1: normal, 2: fast).
Return
true: Configuration successful.
false: Configuration failed.
Sample
Refer to function setUseRainEffect.
stopWeather()
Deactivates the weather representation feature.
setSimpleMode(type) → boolean
Sets the building simple mode.
type
boolean
Building simple mode.
Return
true: Configuration successful.
false: Configuration failed.
Sample
Refer to function setUseRainEffect
setTerrainEffect(value)
Sets the terrain rendering effect.
value
number
Terrain rendering mode (0: normal, 10: slope direction, 11: slope degree)
Sample
Refer to function setUseRainEffect.
updateRTT()
Updates the screen RTT.
Getter / Setter
getSelectObject(), setSelectObject(object) → JSObject
Sets the selection state for the specified object.
getFogLimitAltitude(), setFogLimitAltitude(altitude) → number
Sets the altitude value at which the fog effect is applied.
If the camera is located below the returned altitude, the fog effect is applied.
altitude
number
Altitude limit.
Return
number: Altitude at which the fog effect is applied.
Sample
Refer to function loadHeatmapPoint.
Last updated