S3M (Spatial 3D Model) layer class, through which the 3D s3m tiles can be loaded, including oblique photogrammetric models, BIM models, point cloud data, man-made models, vector data, symbols, etc.
Add the published 3D service in the *.s3m format to the scene through Scene.addS3MTilesLayerByScp(url, options).
Note: Services published through local SCP files do not support the field thematic mapping functionality.
Add the published 3D service in the *.s3m format to the scene through Scene.addS3MTilesLayerByScp(url, options).
Note: Services published through local SCP files do not support the field thematic mapping functionality.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
The parameter object has the following properties:
|
Example:
//new S3MTilesLayer instance
var S3MTilesLayer = new S3MTilesLayer({
gl : gl,
servers : ["http://localhost:8090"],
urls : ["http://localhost:8090/data/tile_001.xml","http://localhost:8090/data/tile_002.xml"],
position : [10,20],
name : ["S3MTilesLayer"]
});
Members
-
staticSuperMap3D.S3MTilesLayer.DEFAULT_TRANSPARENT_BACK_COLOR : Color
-
The default color of the layer's transparent target color is black (Color.BLACK).
-
The default value of layer transparency tolerance is 0.0, that is, opaque
-
Default Value:
0.0
-
allTilesLoaded : Event
-
The event that all slices in the current view are loaded. This event fires when all tiles have loaded.
-
attributeDownloaded : Event
-
An event to determine whether the property file has been downloaded. This event fires when all properties files have been downloaded. Note: When using some attribute fields to set the thematic map, the attribute file will be downloaded after setting queryFiledNames, and there is no need to enable isAttributesSave of indexedDB.
Example:
layer.queryFieldNames = ['FLOOR','HEIGHT']
-
readonlybloomEffect : BloomEffect
-
Get the floodlight effect of the scene, including floodlight intensity value, floodlight brightness threshold, etc.
-
Get whether the floodlight effect is turned on.
-
Release the vertex color memory and restore the vertex color.(Deprecated)
-
Set the layer brightness value to adjust the color.
-
Whether to release memory in time, the default value is true. If set to false, you need to set a value for setCacheSize. (Deprecated)
-
Default Value:
true
Example:
Set the size of the cache space, in MB SuperMap3D.MemoryManager.setCacheSize(512); Choose not to release memory in time SuperMap3D.when.all ([promise],function (layers){ layers[0].forEach ((layer)=>{ layer.clearMemoryImmediately = false })
-
clipLineColor : Color
-
Gets or sets the color of the clipping line when BOX clipping the S3M layer.
-
clippingType : ClippingType
-
Get or set the clipping mode.
-
clipPlaneColor : Color
-
Get or set the color of the cropped section
-
Set the color table mode.
-
colorTableChanged : Event
-
The event when the application of the color table of all volume data slices under the current view angle is completed. This event will be triggered when the color table application of the volume data slice is completed.
-
It is used to specify whether to automatically calculate the height of the model at the front end, the default value is false and no height is calculated. Specifying true for data without height can ensure that operations such as inundation analysis and setting contour lines run normally.
-
Default Value:
false
-
The event when the application of the color table of all volume data slices under the current view angle is completed. This event will be triggered when the color table application of the volume data slice is completed.
-
Get or set the overlay vector tile layer, which is used for mapping onto the surface of oblique photography 3D models.
-
coverImageryLayer : ImageryLayer
-
Get or set the overlay image layer or MVT layer (used to be pasted to the inclined model surface).
-
cullMode : WindingOrder
-
When rendering on one side, get or set the clockwise and counterclockwise rendering
-
custom request header
-
Get the maximum height value or maximum intensity value of the data. For point cloud data, this attribute is height value or intensity value (the default is intensity value); for other 3D data, this attribute is height value.
Example:
//Get the maximum value of the data var dataMaxValue = S3MTilesLayer.DataMaxValue;
-
Get the minimum height value or minimum intensity value of the data. For point cloud data, this attribute is height value or intensity value (the default is intensity value); for other 3D data, this attribute is height value.
Example:
//Get the minimum value of the data var dataMinValue = S3MTilesLayer.DataMinValue;
-
effect : S3MPolylineEffect
-
Gets or sets the line symbol of the S3M layer.
-
Get or set whether the layer is highlighted
-
Default Value:
True
-
color adjustment gamma
-
Get the name of the group to which the layer belongs
-
Gets or sets whether the layer has lighting effects enabled.
-
Gets whether the layer has a wireframe.
-
Get or set the heading angle of the camera (unit: radian)。
-
Set the model z-direction pull height value, the default value is 1
-
Default Value:
1
-
horizontalColor : Color
-
Gets or sets the color of the horizontal line.(Deprecated)
-
Gets or sets the height of the horizontal line.(Deprecated)
-
Set the layer tone value to adjust the color.
-
Get or set the layered coloring expression of the layer.
Example:
//Set layer layer tinting properties var hypsometricSetting = new SuperMap3D.HypsometricSetting(); hypsometricSetting.MinVisibleValue = 30; hypsometricSetting.MaxVisibleValue = 150; var colorTable = new SuperMap3D.ColorTable(); colorTable.insert(150, new SuperMap3D.Color(1, 0, 0)); colorTable.insert(30, new SuperMap3D.Color(0, 0, 1)); hypsometricSetting.ColorTable= colorTable; S3MTilesLayer.hypsometricSetting = { hypsometricSetting : hypsometricSetting, analysisMode: SuperMap3D.HypsometricSettingEnum.AnalysisRegionMode.ARM_ALL } //Set layer layer tinting properties var hyp = S3MTilesLayer.hypsometricSetting ;
-
Get or set the ID of the text layer. This interface specifies a text layer according to the ID, so that the icon layer follows the layer for avoidance. Note: It will only take effect when overlapDisplayOptions.allowIconWithTextDisplay is true.
-
Default Value:
undefined
-
Get the layer id.
-
Get or set whether to automatically calculate the normal in the GPU, the default value is false. When the value is true, the normal is automatically calculated in the GPU, and the normal that comes with the data is not used. When the value is false, the normal is not automatically calculated in the GPU, and the normal that comes with the data is used.
-
Get or set indexedDB attribute information (IE browser does not support). Among them, when setting the indexDB property, There are three Boolean branch attributes: isGeoTilesSave——whether to save tiles; isAttributesSave--whether to save attributes; isGeoTilesRootNodeSave--whether to save the root node.
Example:
//Turn on the Config layer for skewed data var layer = scene.layers.find('Config'); //Set whether to save the tile cache layer.indexedDBSetting.isGeoTilesSave = true
-
Get or set whether to display the overlapping parts of layers. When set to true, the overlapping part is still displayed, that is, it does not participate in avoidance. The default value is false.
-
Default Value:
false
-
labelStyle : S3MTilesLabelStyle
-
Get or set the layer text label style.
-
layerBounds : Rectangle
-
Get or set the layer range. Deprecated the set method, retained the get method.
-
Get or set the loading mode when switching point cloud levels, which are divided into append mode and replace mode.
-
LoadingPriority : LoadingPriorityMode
-
Get or set the priority mode of loading, including depth-first, layer-first, spatial index, and depth-first nonlinear switching.
-
Default Value:
Child_Priority : 1
-
Get or set whether to load volume data, the default value is true.
-
Default Value:
true
-
Gets or sets the LOD level switching distance scaling factor of the layer.
-
The maximum amount of memory (unit: MB) that can be used by the slice dataset, the default value is 512MB.
-
Default Value:
512
-
Get or set the maximum transparency threshold (foreground color transparency set to [0, maxTransparentAlpha] will be considered the same transparency effect, and [maxTransparentAlpha, 1] will have a transparent transition effect).
-
Default Value:
0.98
-
Gets or sets the maximum visible height of the layer.
-
Get or set the minimum transparency threshold (below this value will be filtered out)
-
Default Value:
0.1
-
Gets or sets the minimum visible height of the layer.
-
It is used to specify whether to create a mipmap for the texture. The default value is true to create a mipmap; set it to false to not create a mipmap.
-
Default Value:
true
-
mixColorType : MixColorType
-
Set texture display mode (blend, replace)
-
Get or set whether the layer supports multi-selection.
-
Used for time series data acquisition or setting water surface material
-
Default Value:
{false}
-
get layer name
-
Get or set whether to enable the transparent ordering function (OIT), the default is true.
-
Default Value:
true
-
Get or set the attribute field name of the specified avoidance weight, and the avoidance priority can be distinguished according to this field.
-
Get and set whether the display effect of the transparent material is optimized when OIT is turned on.
-
Default Value:
false
-
Get or set PBR material type.(Deprecated)
-
Default Value:
true
-
Get the encapsulated point cloud rendering parameter object pointCloudShading
-
Get or set the update priority coefficient, which can control the update priority order among multiple layers.
-
Set or get rainwater material influence factors.
-
Whether to draw rasterized vector lines in real time to ensure that the line thickness is consistent at different levels. The default value is false.
-
Default Value:
false
-
Get or set whether the layer accepts pasting objects, the default setting is true, and when it is set to false, no objects will be pasted.
-
Default Value:
true
-
Set whether the root node is resident in memory and not deleted. The default value is false.
-
When the texture compression format is webp, when the texture red and green are reversed, use the color channel RGB to BGR.
-
Default Value:
false
-
S3MTileLoadedEvent : Event
-
Get the event triggered when the S3M slice is loaded. The event handler will be passed the slice's BoundingSphere as a parameter.
-
Set the layer saturation value to adjust the color.
-
selectBound : Rectangle
-
Get and set the marquee range.
-
selectColorType : SelectColorType
-
Get or set the display style of the selected object, model texture and color mixed display or solid color display.
-
selectedColor : Color
-
Get or set the highlight color displayed by the selected layer. When the current mode is wireframe mode, it is used to get or set the highlight color of the selected contour line.
-
selectedLineColor : Color
-
Get or set the highlight color of the luminous outline of the wireframe of the selected object in the layer.
-
Default Value:
new Color(1.0,1.0,1.0,1.0)
-
Get or set the child object ID
-
selectedTranslate : Cartesian3
-
Get or set the offset position of the selected object.
-
Get or set whether the layer is optional.
-
Get or set the transparent selection filter threshold.
-
shadowType : ShadowType
-
Gets or sets the range type of the model participating in the shadow display in the layer.
-
Gets and sets the minimum height for the shadow body to pull down.
-
Gets and sets the maximum height that the shadow body can be pulled up.
-
Get or set whether to display the leader line.
-
Get or set whether to display icons.
-
Get or set whether to display labels.
-
constantsilhouetteColor : Color
-
Set or get the edge outline color, the default is blue
-
Set or get the edge contour size, default 2, unit pixel
-
Default Value:
2.0
-
skeletonSelectedColor : Color
-
Get or set the highlighted color of sub-object selection
-
Get or set whether sub-objects in the layer are selectable
-
splitDirection : SplitDirection
-
Get or set the shutter direction.
-
Get or set the shutter position.
-
style3D : Style3D
-
Get or set the layer style.
Example:
//Get the layer style. var style = S3MTilesLayer.style3D; //Set the layer style. var style3D = new SuperMap3D.Style3D(); var color = new SuperMap3D.Color(1.0, 0.0, 0.0); style3D.fillForeColor = color; S3MTilesLayer.style3D = style3D; //The layer needs to be refreshed after setting S3MTilesLayer.refresh();
-
Get or set the subdomain name. Through this interface, data can be requested from the specified subdomain.
-
Get or set whether to enable the rolling shutter function.
-
swipeRegion : BoundingRectangle
-
Get or set the quadrilateral area of the shutter.
-
Get or set the movement speed of the model texture on the UV coordinates
-
themeStyle : Cesium3DTileStyle
-
Get or set the style of the thematic map. Currently, it supports the thematic map with the ground vector cache and set the filling color and texture according to the ID at the front end. Note: When using model data to make thematic maps, you need to change the "attribute storage type" to "ATTRIBUTR" in the desktop software when generating the cache
-
transparentBackColor : Color
-
Get or set the transparent target color of the layer.
-
Get or set the transparency tolerance of the layer.
-
Gets and sets the filter pixel size.
-
urlType : UrlType
-
Get or set the request form of layer data.
-
Get or set layer visibility。
Example:
//Get layer visibility var isVisible = S3MTilesLayer.visible; //Set layer visibility S3MTilesLayer.visible = false;
-
Gets or sets the maximum visible distance value of this layer, in meters. This distance value is used for the distance filtering function. When the distance between the camera and the layer is greater than this distance value, the layer will not be visible.
-
Gets or sets the minimum visible distance value of this layer, in meters. This distance value is used for the distance filtering function. When the distance between the camera and the layer is smaller than this distance value, the layer will not be visible.
-
Get or set volume data name.
-
waterParameter : WaterParameter
-
Get the water surface effect parameters.
-
Get or set the water surface ripple strength.
-
Get or set the layer wireframe mode.
Methods
-
Add an excavation face.
Name Type Description options
Object Excavation Area Parameters: Name Type Description position
Array Location information of the excavation area. name
String Excavation area name. Returns:
bool Returns true on success and false on failure. -
Adds flattening planes for flattening model surfaces.
Name Type Description options
Object Flattened Area Parameters: Name Type Description position
Array Specifies the location information of the flattened area. name
String Flatten zone names. Returns:
Returns true on success and false on failure.Example:
S3MTilesLayer.addFlattenRegion({ position : [13.0500640714, 47.8279189759, 400.0, 13.0500640714, 47.8230189759, 400.0, 13.0530640714, 47.8260189759, 400.0, 13.0538640714, 47.8230189759, 400.0, 13.0538640714, 47.8279189759, 400.0], name : 'flatten' + SuperMap3D.createGuid()});
-
Use a set of texture images to perform volume rendering on the S3M layer. Volume rendering needs to set the range of volume rendering.
Name Type Description imgArray
Promise.<Image> array of textures. -
The specified range of the S3M layer superimposes pictures.
Name Type Description options
Object Objects have the following properties: Name Type Description name
String Specifies the name of the range. bounds
Array An array of point sets for the specified range. image
Element html image element, texture image for overlay。 Returns:
bool Returns true on success and false on failure. -
Clear custom clipping planes.
Example:
S3MTilesLayer.clearCustomClipBox();
-
Clear polygon object clipping S3M layer.
-
Obtain the name of the layer dataset and the corresponding Id range (applicable for generating caches with multiple datasets).
Returns:
The array contains information about all datasets, and each dataset object contains the dataset name, start Id, and end Id.Example:
var data = layer.datasetInfo(); SuperMap3D.when(data,function(dataSet){ var length = dataSet.length; ....... });
-
Destroy layers, release memory, release webgl resources
-
The border line does not disappear after setting the fill mode
-
Get local object attribute information (svd in indexedDB, IE browser does not support).
Name Type Description id
Number Index -
Get the extent of section clipping.
-
Get historical data key value
-
Get the lOD level switching distance scaling factor of the layer.
Returns:
LOD level switching distance scaling factorExample:
var num = S3MTilesLayer.getLodRangeScale();
-
getObjsColor() → Color
-
Get the color table of the corresponding primitive object according to the ID.
Returns:
The color corresponding to the ID. -
Get the object visibility for the specified ID.
Name Type Description id
Number The specified object ID. Returns:
Whether the object is visible.Example:
var id = 12; S3MTilesLayer.getObjsVisible(id);
-
Get point cloud classification information array.(Deprecated)
Returns:
The first request for data returns a promise. -
Get the corresponding range of the point cloud group.
Name Type Description name
String The name of the corresponding range. Returns:
Obtain the range (Bounds) of the point cloud group by the point cloud name, if not obtained, return undefinedExample:
layer.getPointCloudGroupBounds(name);
-
Get point cloud grouping information
Example:
layer.getPointCloudGroupInfos();
-
Get attribute query parameters.
Returns:
Property query parameter object. -
getSelection() → AssociativeArray
-
Get the selection set.
Returns:
A relational array containing all selected IDs.Example:
S3MTilesLayer.getSelection();
-
Get the array of valid feature fields of point cloud data.
-
Gets the visibility of the corresponding viewport of the layer.
Name Type Description index
Number Index Returns:
visibleThrows:
-
DeveloperError : index value range from 0~3。
-
-
Get all volume data names.
Returns:
An array of all volume data names. -
Refresh the layer.
-
Release the selection set.
Example:
S3MTilesLayer.releaseSelection();
-
Remove all excavation faces.
-
Remove all flattened planes.
Example:
S3MTilesLayer. removeAllFlattenRegion();
-
An operation that removes all primitives.
-
Removes the color set by all primitives.
-
Removes all set extrude heights.
-
Clears all object offsets.
-
Removes offsets from all objects.
-
Removes the excavation face with the specified name.
Name Type Description name
String The name of the excavation face. Returns:
bool Returns true on success and false on failure. -
Removes the applanation plane with the specified name.
Name Type Description name
String The name of the applanation plane to remove. Returns:
If the removal is successful, return true, and if it fails, return false.Example:
S3MTilesLayer. removeFlattenRegion(regionName);
-
According to the primitive ID list, remove the operation (clipping or offset) of the specified primitive.
Name Type Description ids
Array A list of primitive IDs. -
Remove the set color of the corresponding primitive according to the primitive ID list.
Name Type Description ids
Array A list of primitive IDs. -
Remove the stretch height set by the object according to the primitive ID list.
Name Type Description ids
Array A list of primitive IDs. -
Clear object offsets against a list of object ids.
Name Type Description ids
Array A list of object IDs. -
Remove the offset of the specified id object.
Name Type Description ids
Array A collection of ids of objects whose offsets are to be removed. -
Remove the overlay region with the specified name
Name Type Description name
String Overlay area name Returns:
Success returns true, failure returns false -
Used to remove PBR materials
-
Animate the layer.
Name Type Description keyframes
Object point in time. duration
Object Animation duration. InterpolationType
Object Indicates the interpolation type, the default value is Linear Throws:
Example:
var promise = layer.setAnimation({ keyframes: { '0%': { // point in time translation: SuperMap3D.Cartesian3.fromDegrees(layer.lon, layer.lat, layer.height), rotation: new SuperMap3D.HeadingPitchRoll(0, 0, 0), scale: new SuperMap3D.Cartesian3(1, 1, 1), interpolationType: SuperMap3D.InterpolationType.SmoothStep //The interpolation type from this time point to the next time point, if not set, use the InterpolationType of the same level as keyframes. }, // '20%': {}, '100%': { translation: SuperMap3D.Cartesian3.fromDegrees(layer.lon, layer.lat, layer.height), rotation: new SuperMap3D.HeadingPitchRoll(0, 0, 0), scale: new SuperMap3D.Cartesian3(5, 5, 5) }, }, duration: 5, // How many seconds does the animation last interpolationType: SuperMap3D.InterpolationType.Linear // Interpolation type, the default value is Linear })
-
Set object offsets in batches.
Name Type Description option
Object A collection of ids and offsets of objects whose offsets are to be removed. Example:
var option = { id1:Cartesian3, id2: Cartesian3, } layer.setBatchObjsTranslate(option);
-
Set a bounding box for the layer, the model in the box area has a volume rendering effect, and the model outside the area remains as it is.
Name Type Description left
Number The longitude of the left side of the bounding box, in degrees. bottom
Number The latitude below the bounding box, in degrees. right
Number The longitude of the right side of the bounding box, in degrees. top
Number The latitude above the bounding box, in degrees. minHeight
Number The minimum height of the bounding box, in meters. maxHeight
Number The maximum height of the bounding box, in meters. -
Hide the display object according to the W bit feature value
Name Type Description categories
Array.<Number> | Number array of eigenvalues, or eigenvalues mode
CategoryVisibleMode hide, show, reset -
set clipping plane
Name Type Description firstPoint
Cartesian3 Draw the first point of the clipping plane. secondPoint
Cartesian3 Draw the second point of the clipping plane. thirdPoint
Cartesian3 Draw the third point of the clipping plane. renderClipSection
Boolean Draw the crop section. Example:
var p1 = new SuperMap3D.Cartesian3(-8787.4,2084.7,7021.04335128); var p2 = new SuperMap3D.Cartesian3(-8786.3,2081.8,7024.90146083); var p3 = new SuperMap3D.Cartesian3(-8783.2,2086.8,7021.04335128); for(var i = 0;i < layers.length;i++){ layers[i].setClipSection(p1,p2,p3,true); }
-
Set the feature fields of point clouds.
Name Type Description fieldName
CategoryFieldName optional Feature field. -
Add custom clipping planes.
Name Type Description options
Object Clipping plane parameters: Name Type Description dimensions
Cartesian3 Specify the length, width and height of the clipping box. position
Cartesian3 Specifies the clipping plane location. clipMode
String Specifies the cropping mode. Crop modes include the following categories:
clip_behind_any_plane:Clips away the portion that lies behind any clipping planes.
clip_behind_all_plane:Clips away the portion that lies behind all clipping planes.
only_keep_line:Only the crop line is kept, and the rest is cropped.Returns:
Returns true if the addition is successful, and returns false if it fails.Throws:
-
DeveloperError : options and options.dimensions and options.position are required.
Example:
var boxOptions = { dimensions : new SuperMap3D.Cartesian3(10, 10, 10) position : SuperMap3D.Cartesian3.fromDegrees(120, 40, 20), clipMode : "clip_behind_all_plane" }; S3MTilesLayer.setCustomClipBox(boxOptions);
-
-
Set region clipping parameters.
Name Type Description options
Object The parameter object contains the following properties: Name Type Description position
Cartesian3 optional The position coordinates of the center point. dimensions
Cartesian2 optional The width and height of the clipping area, unit: meter. heading
Number optional The rotation angle of the clipping plane around the Z axis, unit: degree. pitch
Number optional The rotation angle of the clipping plane around the X axis, unit: degree. roll
Number optional The rotation angle of the clipping plane around the Y axis, unit: degree. extrudeDistance
Number optional The stretching distance of the center point of the clipping area, unit: meter. -
Set the polyhedron clipping parameters.
Name Type Description options
Object The parameter object contains the following properties: Name Type Description geometry
Geometry3D optional Geometry objects (currently only convex polyhedra are supported). clippingType
ClippingType optional cropping type spatialQuery
SpatialQuery3D optional Spatial query object. Example:
var geometry = new Geometry3D(pts) geometry.extrudeHeight = 100; var spatialQuery = new SpatialQuery3D(); spatialQuery.build(); layer.setCustomClipGeometry({ geometry : geometry; clippingType : ClippingType.KeepOutside; spatialQuery : spatialQuery })
-
Profile analysis.
Name Type Description firstPoint
Cartesian3 Draw the first point of the section。 secondPoint
Cartesian3 Draw the second point of the section. thirdPoint
Cartesian3 Draw the third point of the profile. clipPlaneMode
ClipPlaneMode Cropped section mode. Example:
var p1 = new SuperMap3D.Cartesian3(-8787.4,2084.7,7021.04335128); var p2 = new SuperMap3D.Cartesian3(-8786.3,2081.8,7024.90146083); var p3 = new SuperMap3D.Cartesian3(-8783.2,2086.8,7021.04335128); for(var i = 0;i < layers.length;i++){ layers[i].setCustomClipPlane(p1,p2,p3); }
-
Display the specified object on the front end by floors
-
Set the flattened area split screen.
Name Type Description index
Number Index Returns:
visibleThrows:
-
DeveloperError : index value range from 0~8。
-
-
Set historical data
Name Type Description key
String optional Historical data key value -
Set the lOD level switching distance scaling factor of the layer.
Name Type Description lodrange
Number LOD level toggle distance scaling factor. Example:
S3MTilesLayer.setLodRangeScale();
-
Clip S3M layers according to polygonal objects.
Name Type Description regions
Array Polygon array. mode
mode Clipping mode, set the inner extent or outer extent of the clipping polygon object. Clips the inner range when the value is CLIP_INSIDE, and clips the outer range when the value is CLIP_OUTSIDE. -
Perform functional operations on the specified ID object.
Name Type Description ids
Array A list of object IDs. operationType
Number Function operation type, the value is CLIP, which takes effect for the clipping function. -
According to the primitive IDS list, set the color of the corresponding primitive.
Name Type Description ids
Array A list of primitive IDs. color
Color The color of the primitive. -
According to the IDS list, set the stretch height of the object.(Deprecated)
Name Type Description ids
Array A list of primitive IDs. height
Number Object extruded height value. -
Sets object offsets based on a list of object IDs.
Name Type Description ids
Array A list of object IDs. -
Sets the object's offset based on the specified id.
Name Type Description ids
Array Specifies the id of the object whose offset is to be set. translate
Cartesian3 Specifies the offset. -
According to the list of primitive IDs, set the visibility of the corresponding primitive, and form a mutually exclusive visible relationship with other primitives of this layer.
Name Type Description ids
Array A list of primitive IDs. isVisible
Boolean is visible. Example:
//Set the graphic element whose id is 1 to be displayed, and all other graphic elements are invisible. layer.setObjsVisible([1],true); //Set the hidden primitive with id=1, and make all other primitives visible. layer.setObjsVisible([1],false);
-
According to the list of primitive IDs, set the visibility of the corresponding primitive (manually set). If ids is empty, isVisible is to set the visibility of all layers.
Name Type Description ids
Array A list of primitive IDs. isVisible
Boolean is visible. Example:
//Set the primitives with id 1 and 2 as invisible, and the visible state of other primitives remains unchanged. layer.setOnlyObjsVisible([1,2],false); //Set the primitives with id 1 and 2 as visible, and the visible state of other primitives remains unchanged. layer.setOnlyObjsVisible([1,2],true);
-
Used to set the PBR material type. (Deprecated)
See:
-
Used to import PBR materials from JSON files, the parameter is the URL of the JSON file.
-
Sets the visibility of point cloud grouping.
Name Type Description groupNames
Array Layer group name. isVisible
Boolean is visible. Example:
//Set the layer group named "group1" to be visible layer.setPointCloudGroupsVisible(["group1"],true);
-
Sets the polygon offset.
Name Type Description factor
Number Offset slope factor, default is 0. units
Number Offset unit, default is 0. Example:
layer.setPolygonoffset(-1,-1);
-
Set property query parameters.
Name Type Description options
Object Objects have the following properties: Name Type Default Description url
String optional Data service url. dataSourceName
String optional Data source name. dataSetName
String optional Dataset name. isMerge
Boolean optional Whether the layer is merged dataset, if yes, don't specify the dataset name. hasGeometry
Boolean false
optional Attribute query returns whether the result contains geometry information. Example:
layer.setQueryParameter({ url: 'localhost:8090/services/realspace/services/xxx/rest/data', dataSourceName: 'xxx', dataSetName: 'xxx' });
-
Set the selection set, used for selection when scene.pick.
Name Type Description ids
Array Primitive ID set. -
Used to set the emissive unit.(Deprecated)
See:
-
Sets the visibility of the layer corresponding to the viewport.
Name Type Description index
Number Index visible
Boolean visibility Throws:
-
DeveloperError : index value range from 0~3。
-
-
Traverse all primitives, and update the color of corresponding primitives according to the ID list.
Name Type Description ids
AssociativeArray An array of relations between primitive ID lists and colors. -
Traverse all primitives, update the visibility of corresponding primitives according to the ID list, and mutually exclusive visible relationship. If [1,2] is set to be visible, the rest of the primitives are not visible, and if [1,2] is set to be invisible. Then the rest of the primitives are visible.
Name Type Description ids
AssociativeArray An array of relations between primitive ID lists and colors. visible
Boolean is visible -
Update the rendering state.