JSPoint
API for creating and modifying Point objects.
Create a API with Module.createPoint.
var object = Module.createPoint("ID");
Function
getAltitude() → number
Returns the altitude of the object.
Return
number: Object's altitude (in meters).
getFontColor() → JSColor
Returns the text color of the object.
Return
(JSColor): Successfully returns the text color.
null: text color return failed.
getFontName() → string
Returns the font name of the object's text.
Return
string: Successfully returns the text font name.
null: Font name return failed.
getFontOutColor() → JSColor
Returns the text outline color of the object.
Return
(JSColor): Successfully returns the text outline color.
null: Text outline return failed.
getFontSize() → number
Returns the text size of the object.
Return
number (0 or higher): Successfully returns the object's text size.
number (-1): If the object is null.
getFontWeight() → number
Returns the text weight of the object.
Return
number (0 or higher): Successfully returns the object's text weight.
number (-1): If the object is null.
getHighlightIcon() → JSIcon
Returns the Highlight type icon object.
Return
JSIcon: The set icon object.
getIcon() → JSIcon
Returns the default type icon object.
Return
JSIcon: The set icon object.
getId() → string
Returns the ID of the object.
Return
string: Successful return of the object's Key string.
null: If the object is null.
getLatitude() → number
Returns the latitude of the object.
Return
number: Object's latitude (in degrees).
getLongitude() → number
Returns the longitude of the object.
Return
number: Object's longitude (in degrees).
getPosition() → JSVector3D
Returns the position of the object.
Return
JSVector3D: Returns the bottom center coordinates (longitude, latitude, altitude) of the object successfully.
null: Coordinate return failed.
getVisibleRangeActivate() → boolean
Returns whether the visibility range value of the POI object is enabled or disabled.
If the visibility range value is disabled, the POI object's visibility range references the visibility range value of the layer to which the POI object belongs.
POI objects created through the service layer cannot have their visibility range values set.
Return
true: Visibility range setting successful.
false: Visible range setting failed.
Failure conditions.
If the POI object is created from data loaded from an external server.
If the POI object is null.
getVisibleRangeMax() → number
Returns the maximum visibility range value of the POI object.
Return
Valid number: Successfully returns the maximum visibility range value.
In the following cases, the API always returns a fixed value.
-999.0: If the POI object is null.
-998.0: If the POI object is created from data loaded from an external server.
-997.0: If the visibility range setting is deactivated.
getVisibleRangeMin() → number
Returns the minimum visibility range value of the POI object.
Return
Valid number: Successfully returns the minimum visibility range value.
In the following cases, the API always returns a fixed value.
-999.0: If the POI object is null.
-998.0: If the POI object is created from data loaded from an external server.
-997.0: If the visibility range setting is deactivated.
isExistHighlightIcon() → boolean
Returns whether a highlight type icon is specified.
Return
true: An icon is specified.
false: No icon is specified.
isExistIcon() → boolean
Returns whether a default type icon is specified.
Return
true: An icon is specified.
false: No icon is specified.
setAltitude(alt) → boolean
Sets the altitude value of the object (object latitude and longitude remain unchanged).
alt
number
Altitude (in meters).
Return
true: Location setting successful.
false: Location setting failed.
setFontStyle(name, size, weight, fill_color, outline_color) → boolean
Sets the text style of the POI.
Font, size, weight, and color settings.
Return
true: Object setting successful.
false: Object setting failed.
Sample
Refer to function createPoint.
setHighlightIcon(icon) → boolean
Sets the Highlight type icon.
Return
true: Icon setting successful.
false: If the object does not exist or the texture does not exist.
setIcon(icon) → boolean
Sets the default type icon.
Return
true: Icon setting successful.
false: If the object does not exist or the texture does not exist.
setImage(data, width, height) → boolean
Sets an image for the POI.
The data variable is based on a Uint8Array of binary array data.
Actual size of width, height must be entered (>1).
data
array
Image pixel value array.
width
number
Image width.
height
number
Image height.
Return
true: image setting successful.
false: image setting failed.
Failure conditions.
If data value is null.
If width, height < 0
Sample
Refer to function createPOI.
setLatitude(lat) → boolean
Sets the latitude value of the object (object longitude and altitude remain unchanged).
lat
number
Latitude (in degrees).
Return
true: Location setting successful.
false: If the object does not exist.
setLongitude(lon) → boolean
Sets the longitude value of the object (object latitude and altitude remain unchanged).
lon
number
Longitude (in degrees).
Return
true: Location setting successful.
false: If the object does not exist.
setLonLat(lon, lat) → boolean
Sets the location (longitude, latitude) of the object (object altitude remains unchanged).
lon
number
Longitude (in degrees).
lat
number
Latitude (in degrees).
Return
true: Location setting successful.
false: Location setting failed.
setPosition(position) → boolean
Sets the location of the POI.
Return
true: Setting successful.
false: Setting failed.
Sample
Refer to function createPOI.
setPositionLine(length, color) → boolean
Sets a line perpendicular to the ground to be visible for the specified length.
A length input value > 0 is required.
length
number
POI vertical line length.
Return
true: Object setting successful.
false: Object setting failed.
Failure conditions.
If type<0 value is set.
Sample
Refer to function createPOI.
setRenderToTerrainTexture(type) → boolean
Sets the POI to be drawn on the terrain based on RTT.
type
boolean
true for terrain-combined visualization (RTT) false for default visualization.
Return
true: Object setting successful.
false: Object setting failed.
Sample
Refer to function createPOI.
setText(text) → boolean
Sets the visualization text for the POI.
text
string
POI text
Return
true: Object setting successful.
false: Object setting failed.
Sample
Refer to function createPOI.
setVisibleRange(enable, min, max) → boolean
Sets the visibility range of the POI object.
If the min value is greater than the max, it automatically switches the smaller value to min and the larger value to max.
If the POI object is created from data loaded from an external server, the visibility range cannot be set.
enable
boolean
Whether to activate the visibility range value.
min
number
Minimum visibility distance.
max
number
Maximum visibility distance.
Return
true: Visibility range setting successful.
false: Visibility range setting failed.
Failure conditions.
In the following cases, the API always returns false.
If the POI object is created from data loaded from an external server.
If the POI object is null.
Getter / Setter
getDescription(), setDescription(desc) → string
Set a description for the object.
desc
string
Object description string.
Return
string: Successful return of the object's description string.
null: If the object is null.
getHighlight(), setHighlight(highlight) → boolean
Sets whether to use the Highlight type icon.
highlight
boolean
true: Sets to display the Highlight icon image. false: Sets to display the default icon image.
Return
true: Setting successful.
false: Setting failed.
Failure conditions.
In the following cases, the API always returns false.
If the POI object is null.
If there is no icon set for the Highlight type.
getName(), setName(name) → string
Sets the name of the object.
name
string
The name to set for the object.
Return
string: Successful return of the object's name.
null: If the object is null.
getVisible(), setVisible(visible) → boolean
Sets the visibility state of an object.
visible
boolean
true: Make the object visible. false: Hide the object.
Return
true: Object visible state.
false: Object hidden state.
Last updated