Update Version 1.5x

- API Changes -

Added Classes

  • JSProj: Added coordinate transformation functionality using EPSG.

  • Refer to the JSProj for more information.

Added APIs

API to remove duplicate points with the same values from a list of coordinates in JSVec3Array

var list = new Module.JSVec3Array();
list.push(new Module.JSVector3D(129.128265, 35.171834, 1000));
list.push(new Module.JSVector3D(129.128845, 35.171145, 1000));
list.push(new Module.JSVector3D(129.128845, 35.171145, 1000)); // Duplicate point
list.push(new Module.JSVector3D(129.128951, 35.170951, 1000));

var removed_count = list.removeDuplicateVectors(Number.EPSILON);

API to change the lighting color of ghost symbols

let object = Module.createGhostSymbol("Object Name");
// Creation code
object.lightColor = new Module.JSColor(255, 128, 128, 128);

API to return the intersection points of a vertical cross-section of a pipe layer (ELT_PIPE) containing JSPipe objects

  • class: JSLayer

  • parameter: Path of the vertical plane for which to calculate intersections (input type JSVec2Array)

  • return: Array of positions (longitude, latitude, altitude) and a list of object keys for pipes where intersections occur

var path = new Module.JSVec2Array();
path.push(new Module.JSVector2D(126.92326703887365, 37.5249592425154));
path.push(new Module.JSVector2D(126.923563634119, 37.524387028175454));
path.push(new Module.JSVector2D(126.92490490575213, 37.52439598531512));

var intersection = pipeLayer.getPipeIntersection(path);
console.log(intersection);

JSSolarManager API Update

  • getLayerPannelInfo

  • addPlannelObject

JSCamera API (Property) Update

  • collision_type(type boolean): Sets whether there is a collision between the camera and the selection point during wheel events.

  • collision_distance(type number): Sets the interpolation distance between the camera and the selection point (mouse event point) during wheel events.

var camera = Module.getViewCamera();
camera.collision_type = true;
camera.collision_distance = 20;

Improved APIs

Changes in the use of APIs due to the change in VWorld request URL

// Method to initialize the map
Module.initialize({
    container: document.getElementById("map"),
    terrain: {
        dem: {
            url: "http://xdworld.vworld.kr:8080",
            name: "dem",
            servername: "XDServer3d", // Server name for the request
            encoding: true, // DEM decryption
        },
        image: {
            url: "http://xdworld.vworld.kr:8080",
            name: "tile_mo_HD",
            servername: "XDServer3d", // Server name for the request
        },
    },
    defaultKey: "Enter authentication key",
});
// Method to create a TileLayer
// The createXDServerLayer API of JSLayerList has been updated with the servername option. Set the updated server name here.
var layer = Module.getTileLayerList().createXDServerLayer({
    url: "http://xdworld.vworld.kr:8080",
    servername: "XDServer3d", // Server name for the request
    name: "facility_build",
    type: 9,
    minLevel: 0,
    maxLevel: 15,
});

Improvements in JSColorPolygon Creation Feature

var polygon = Module.createColorPolygon("GRADATION_POLYGON");
polygon.set({
    vertex: [new Module.JSVector3D(129.12909050967076, 35.17110889362373, 4.22), new Module.JSVector3D(129.130474460754, 35.17110084682464, 4.0), new Module.JSVector3D(129.13056137846394, 35.17032570132414, 4.07), new Module.JSVector3D(129.12921614563658, 35.17031032880493, 4.39)],
    color: [new Module.JSColor("#FF0000"), new Module.JSColor("#FF0000"), new Module.JSColor("#FFFF00"), new Module.JSColor("#FFFF00")],
    index: [0, 1, 2, 0, 2, 3],
});

Improvements in JSLineString Creation Feature

var line = Module.createLineString("GRADATION_LINE");
line.createbyJson({
    coordinates: {
        style: "XYZ",
        coordinate: [
            [129.12486405043842, 35.17410008274932, 5.7],
            [129.12522538156702, 35.17364593649981, 5.6],
            [129.12563286539853, 35.17332821268188, 5.6],
        ],
    },
    type: 0,
    color: [
        { a: 255, r: 255, g: 0, b: 0 },
        { a: 255, r: 255, g: 127, b: 0 },
        { a: 255, r: 255, g: 255, b: 0 },
    ],
    width: 10.0,
});

Sandbox Update

- Update History -

1.59.1 (2024/3/8)

1. Fixed an issue where the mouse mode was locked when executing the createShadow API

  • Fixed an issue where the mouse mode was locked to normal mode (1) when executing the createShadow API of JSAnalysis.

2. Fixed an error in setting the setHeight API of JSFlowPolygon

  • Fixed an issue where there was a discrepancy in the set value of the setHeight API.

  • Added APIs to the JSLayer class for setting/returning the LOD Max value of the ETLT_TILE_LOD_MODEL type layer.

  • setTileLODMaxLevel(_nMaxLevel): Sets the LOD Max value (-1 for no limit). The default value is -1.

  • getTileLODMaxLevel(): Returns the LOD Max value.

    var layerList = new Module.JSLayerList(false);
    var layer = layerList.nameAtLayer("bldg_us_jsp");
    layer.setTileLODMaxLevel(3);

1.59.0 (2024/2/23)

1. Fixed an issue where the globe appeared black immediately after engine load

  • Fixed an issue where the globe appeared black due to incomplete reception of terrain images immediately after engine load.

2. Added a function to return terrain altitude from the server

  • Added an API to receive DEM altitude values from the terrain server currently requested by the engine.

  • Since the altitude values are returned asynchronously, they are received through a callback function.

  • If there are no altitude values corresponding to the entered latitude/longitude and terrain level, or if there is no terrain data on the server, null is returned.

Module.getTerrain().getServerAltitude({
    level : 15,
    positions : [
        new Module.JSVector2D(127.055035334602, 37.48664424515323),
        new Module.JSVector2D(127.05509237777562, 37.48664424515323),
        new Module.JSVector2D(127.05509237777562, 37.48668970070035)
    ]
}, function (result) {
    console.log(result);
})

// Return value
(3) [{…}, {…}, {…}]
> 0 : {longitude: 127.055035334602, latitude: 37.48664424515323, altitude: 9.70352554321289}
> 1 : {longitude: 127.05509237777562, latitude: 37.48664424515323, altitude: 9.70939826965332}
> 2 : {longitude: 127.05509237777562, latitude: 37.48668970070035, altitude: null}    // Returns null if there is no altitude value
   length : 3

3. Added an error for dashed line creation

  • Fixed an issue where the dashed property of the JSLineString object was not applied.

1.58.0 (2024/1/26)

1. Provided JSProj Class

2. Applied Background Color Change

  • Added application of world color change through backgroundColor: { JSColor } property in JSOption.

3. Distance Adjustment When Zooming into Buildings

  • Added JSCamera components

1.57.2 Hotfix (2024/1/19)

1. Fixed Ghost Symbol Shadow Processing

  • Fixed an issue where shadow processing was not applied to ghost symbol objects.

2. Added API for Creating Grid Polygon Based on TM Coordinates

  • Added bool JSPolygon::createTMCoordPlane(_options) API.

  • Parameters: _options = {

    • llcorner: {

      • coordCode: number, // Apply TM coordinate code

      • x: number, // Bottom left x-axis value

      • y: number } // Bottom left y-axis value

    • grid: {

      • col: number, // Total number of columns in the grid

      • row: number, // Total number of rows in the grid

      • cellSize: number } // Size of each cell in the grid (in meters)

    • gab: number } // Gap in grid creation (number of cells to skip)

  • Returns bool: Success of creation

  • Sample code

// Create polygon
const polygon = Module.createPolygon("POLYGON_IMG_" + layer.getObjectCount());
polygon.createTMCoordPlane({
    llcorner: {
        coordCode: 20,
        x: 491218.21,
        y: 340251.12,
    },
    grid: {
        col: 640,
        row: 1120,
        cellSize: 5,
    },
    gab: 20,
});

1.57.1 Hotfix (2024/1/5)

1. Network Communication Stabilization

  • Stabilized the data request process.

2. Fixed Rendering of Selected Objects (Issue #368)

  • Fixed an issue where selected objects were not visible when selecting objects below ground.

1.57.0 (2023/12/29)

1. Added Property to Return Recent Screen Refresh Time

  • Added a property to JSMap that returns the time when the screen was last refreshed in year/month/day/hour/minute format.

    var time = Module.getMap().lastRenderTime;
    image

2. Added Property for Visualization Settings of 2D Bar Graph Values: Issue #365

  • Added properties for visualizing values of 2D bar graphs (column unit, total unit).

  • Setting visualization of column unit values

    graph.columnValueVisible = false;
  • Setting visualization of total unit values

    graph.totalColumnValueVisible = false;

3. Adjustment of Visibility Range During First-Person Camera Movement: Issue #363

  • Reduced the minimum visibility range of objects in front of the camera during first-person camera settings to prevent terrain from being culled.

1.56.2 Hotfix (2023/12/21)

  • Fixed the POI visibility module Issue 362 resolved

1.56.1 Hotfix (2023/12/15)

  • Fixed an error in setting JSPolygon setHeight Issue 359 resolved

    • Fixed an issue where the polygon culling face was created in reverse when applying setHeight to an object created with setCircle.

1.56.0 (2023/12/12)

1.55.2 Hotfix (2023/11/24)

  • Fixed a view analysis error

1.55.1 Hotfix (2023/11/3)

1.55.0 (2023/10/27)

1. Added Feature to Load Texture Based on Pixel Data in JSPolygon

  • Updated the loadTexture API, which previously loaded data via URL, to allow direct application of pixel data.

  • Since data is not loaded through the network, the texture can be applied immediately after executing the API using the setFaceTexture API.

function setFaceTextureByPixelColors(_polygon, _faceIndex) {

    // Create a canvas to draw the image
    var canvas = document.createElement("canvas");
    canvas.width = 128;
    canvas.height = 128;

    var context = canvas.getContext("2d");

    (... Draw image on canvas using context ...)

    // Return pixel data drawn on canvas
    // Save to JSPolygon's texture list
    _polygon.loadTexture("Texture Name", {
       width : canvas.width,
       height : canvas.height,
       pixels : context.getImageData(0, 0, canvas.width, canvas.height).data
   });
   // Specify texture for the first face of JSPolygon
   _polygon.setFaceTexture(0, "Texture Name");
}

1.54.1 Hotfix (2023/10/13)

1. Fixed Transparency Setting Error for WMS, WMTS Images

  • Fixed an issue where transparency values were not correctly set for certain areas of the image.

2. Added Callback Property to JSPolygon loadTexture API (Issue #336)

  • Modified the loadTexture API to receive image load callbacks instead of handling the Fire_EventTextureLoadComplete event.

    polygon.loadTexture("polygon_rtt_texture", {
        url: "./data/polygon_rtt_texture",
        callback: function (e) {
            console.log(e);
        },
    });
  • The existing loadTexture API without callback processing is also compatible.

    polygon.loadTexture("polygon_rtt_texture", "./data/polygon_rtt_texture");

1.54.0 (2023/9/26)

1. Atmospheric Twilight Effect

  • Added an API to change the atmospheric color according to the specified sunrise and sunset times.

  • APIs

    • JSOption.setAtmosphericSunriseTime(hour, minute);

    • JSOption.setAtmosphericSunsetTime(hour, minute);

    • JSOption.setAtmosphericTime(hour, minute);

  • Sample code

    // Set sunrise time
    Module.getOption().setAtmosphericSunriseTime(6, 30);
    // Set sunset time
    Module.getOption().setAtmosphericSunsetTime(19, 0);
    // Set atmospheric time
    Module.getOption().setAtmosphericTime(12, 0);

2. Added Feature to Edit Transparency of Hybrid Layers

  • Modified the setAlpha API of JSLayer for adjusting transparency values.

  • API: JSLayer.setAlpha(parameter);

  • Sample code

    let layerList = new Module.JSLayerList(false);
    var layer = layerList.nameAtLayer("layername");
    layer.setAlpha(180);

3. Added Feature to Edit Transparency of Hybrid Layers

  • Modified the setAlpha API of JSLayer for adjusting transparency values.

  • API: JSLayer.setAlpha(parameter);

  • Sample code

    let layerList = new Module.JSLayerList(false);
    var layer = layerList.nameAtLayer("layername");
    layer.setAlpha(180);

4. WMTS Exception Handling

  • Added exception handling for tiling in WMTS.

1.53.3 Hotfix (2023/9/12)

1.53.2 (2023/9/12)

1. Added API for Creating Spherical Polygons Issue #322

  • Added an API to JSPolygon for creating spherical polygons.

  • API: JSPolygon.setSphere(parameter);

  • Sample code

    var polygon = Module.createPolygon("GRADATION_POLYGON");
    let parameter = {
        position: new Module.JSVector3D(lon, lat, alt), // Longitude, latitude, altitude coordinates
        color: new Module.JSColor(255, 0, 255, 0), // Sphere color default: JSColor(255, 0, 255, 0)
        radius: 40, // Sphere radius setting (in meters) default: 10
        segment: 50, // Sphere precision setting default: 30
    };
    polygon.setSphere(parameter);

2. Added Property to Turn On/Off Depth Buffer for JSPolygon

  • Added a boolean type property 'zBufferOff' to JSPolygon to turn on/off the depth buffer test.

  • The default value is false.

  • Sample code

    polygon.zBufferOff = true;

3. Added Feature to Adjust Transparency of PNG Tilemap Layers Issue #321

  • Added a feature to adjust the transparency value of hybrid layers using the setAlpha API of JSLayer.

  • API: JSLayer.setAlpha(parameter);

  • Sample code

    let layerList = new Module.JSLayerList(false);
    var layer = layerList.nameAtLayer("layername");
    layer.setAlpha(180);

1.53.1 Hotfix (2023/8/4)

1.53.0 (2023/7/28)

1.52.1 Hotfix (2023/7/14)

1. Added Property for Mouse Button Press State Inside the Engine

  • Added properties for left mouse button press (mouseLeftButtonDown) and right mouse button press (mouseRightButtonDown) inside JSControl.

    console.log(Module.getControl().mouseLeftButtonDown);
    console.log(Module.getControl().mouseRightButtonDown);

2. Modified Mobile Touch Rotate Event Tilt Limit Feature

  • Fixed an issue where the tilt limit was not applied during mobile touch rotate events after setting JSCamera.setLimitTilt("input value").

3. Added Feature to Create Polygon with Side Thickness

  • Added a feature to create a JSColorPolygon with side thickness based on altitude.

  • API: JSColorPolygon.createbyJson(parameter);

  • Sample code

var polygon = Module.createColorPolygon("GRADATION_POLYGON");
let parameter = {
    coordinates: {
        coordinate: vertices, // Geometry longitude and latitude coordinate list
        index: indices, // Geometry visualization index setting
    },
    color: colors, // Vertex color setting
    thickness: 0, // Thickness setting (in meters)
};
polygon.createbyJson(parameter);

3. Added Feature to Return Longitude and Latitude Coordinates of JSColorPolygon

  • Added a feature to return the list of geometry longitude and latitude coordinates that make up the JSColorPolygon.

  • API: JSColorPolygon.toLonlatArray();

1.52.0 (2023/6/30)

1. Added Property to Distinguish Between Aboveground and Underground Rendering of Layers (Issue 297)

  • Added a view_underground property to distinguish whether a layer is located aboveground or underground.

  • layer.view_underground = true

  • The default value is false. (For Module.TILE_LAYER_TYPE_VECTOR_PIPE type layers, the default value is applied as true.)

  • Added getLayerPannelInfo to receive placement information of solar panels at the API level.

    • Information on the panel's location, width, height, thickness, direction angle, and vertical angle is provided as String Json information and can be rearranged using the API below.

  • Added bool addPlannelObject to manually place panels based on solar panel information.

  • Rooftop panel placement simulation: https://sandbox.egiscloud.com/code/main.do?id=analysis_pannel_roof

  • Ground panel placement simulation: https://sandbox.egiscloud.com/code/main.do?id=analysis_pannel_terrain

  • Veranda panel placement simulation: https://sandbox.egiscloud.com/code/main.do?id=analysis_pannel_veranda

  • Wall (BI) panel placement simulation: https://sandbox.egiscloud.com/code/main.do?id=analysis_pannel_wall

3. Added API for Converting Between JSVector3Array and JSVector2Array

  • Added toJSVector3Array and toJSVector2Array APIs for smooth conversion between JSVector3Array and JSVector2Array.

  • When converting from JSVector2Array to JSVector3Array, altitude value input is required.

  • When converting from JSVector3Array to JSVector2Array, altitude values are lost.

    var array2D = new Module.JSVector2Array();
    var array3D = new Module.JSVector3Array();
    ...
    console.log(array2D.toJSVector3Array(10.0));         // Convert from JSVector2Array to JSVector3Array
    console.log(array3D.toJSVector2Array());   // Convert from JSVector3Array to JSVector2Array

4. Added getBoundary API to JSVector3Array, JSVector2Array

  • Added getBoundary API to JSVector3Array, JSVector2Array to return min, max values.

    var boundary = array2D.getBoundary());
    console.log(boundary.min);
    console.log(boundary.max);
  • If the list is empty and contains no values, null is returned.

1.51.3 Hotfix (2023/6/15)

1. WMTS API Improvement

  • Added unnecessary WMTS request exception handling.

1.51.2 Hotfix (2023/6/9)

  • Added getLayerPannelInfo API to return solar panel placement information.

  • Added addPlannelObject API to allow direct placement of solar panels.

  • Issue 296 error correction completed

1.51.1 Hotfix (2023/6/12)

  • Added color polygon creation feature

    • Added an API that allows defining the shape of a polygon directly using a list of vertices and indexing information.

      • Vertices: List of position coordinates that make up the polygon

      • Index: List of integers mapping each vertex to triangles

  • Each vertex can also define a matching list of colors.

  • If the polygon's triangles are defined using vertices alone without indexing, indexing can be omitted. However, this method may be less efficient due to the addition of duplicate points in the list.

  • Added feature to set colors for each point when creating a line

    • When creating a line with JSLineString, a feature has been added to individually specify colors for each vertex.

    • Previously, the color tag in the API only allowed setting a single color, but this update allows specifying colors for each vertex.

    • When specifying colors for each vertex, input an array of color values in the color tag.

    • The number of colors must match 1:1 with the number of vertices. If they do not match, the first color in the array is referenced, and a single color is applied.

1.51.0 (2023/5/26)

1. Fixed a rendering error of objects in a split-screen environment Issue #289

  • Fixed an issue where transparent objects were rendered without specifying a screen division in a split-screen environment.

2. Added Window Analysis Feature

  • Select a window area (bottom left, top right or top left, bottom right) to create, copy/paste, and copy floors for window analysis.

  • The analysis results are returned in json format, including continuous sunlight amount and total sunlight amount.

1.50.2 Hotfix (2023/05/17)

  • Fixed an error with background maps (Google, MapBox, OpenStreetMap)

    • Fixed an issue where certain areas of some background maps were missing.

1.50.1 Hotfix (2023/05/12)

  • Improved API due to VWorld server change

    • Changed request URL from http://xdworld.vworld.kr:8080/XDServer/ to http://xdworld.vworld.kr:8080/XDServer3d/

    • VWorld DEM data is now provided encrypted.

    • Provided map and facility layer setting features

  • Added an API to return the intersection points of a vertical cross-section of a pipe layer (ELT_PIPE) containing JSPipe objects.

1.50.0 (2023/04/28)

  • Added API and properties to JSFlow

    • Added JSFlow::setJSON(_option) - Integrated creation API based on wind field.

    • Added real-time application and return properties to the JSFlow class as follows.

  • Added filtering step for duplicate point input during distance measurement

    • Added an exception handling step for when the same point is clicked twice during distance measurement.

  • Added API to remove duplicate points in JSVec3Array coordinate list

    • The discrimination value for determining the same point can be set externally.

    • The unit of the discrimination value is meters.

    • In the example above, Number.EPSILON is specified, but if you specify a parameter value of 0.1, points within 0.1m distance are considered the same point and removed.

    • The API returns the number of points removed when executed.

  • Removed path simplification process during pipe creation

    • The path simplification process in the JSPipe object create API has been removed.

    • The original create API considered points closer than 0.1m as duplicate points and omitted them,

Last updated