-
-
Gets or sets the overall transparency of the layer, with a value between 0 and 1 (0 is completely transparent).
-
detailLevelOffset : Number
-
Set the fine layer of the MVT layer to use the texture of the rough layer. Specify the number of offset layers by numbers. When a positive integer is used, the texture of the fine layer above the current layer is used, and when it is negative, it is offset downward, and number represents the number of offset layers.
-
-
Set whether to turn on the gradient (gradient fusion when the upper and lower layers affect the switch) type is bool, the default value is false
false
-
isOverlapDisplayed : Boolean
-
Gets or sets whether the overlapping part of the layer is displayed. When set to true, the overlapping part is still displayed, that is, it does not participate in avoidance. The default value is false.
false
-
-
Get or set the mapbox standard style object used by the layer, which can be used to modify the map style, style, thematic map, etc. on the front end.
Reference to various specifications in mapbox's style: "https://docs.mapbox.com/mapbox-gl-js/style-spec/".
-
-
Get the maximum level of the layer.
-
-
Get the minimum level of the layer.
-
overlapDisplayedThreshold : Boolean
-
Set the text/icon avoidance threshold, the default value is 0
0
-
-
Get the geographical scope of the data.
See:
-
-
Set the hightlight color for selection, with the default value being Supermap3D.Color.CYAN
false
-
-
Get or set the visibility of the layer.
-
-
Gets or sets whether to display the leader line.
-
-
Get or set the display style.
See:
-
-
Set whether to turn on the shutter function, default value: false
false
-
-
Set the upper left and lower right corners of the rolling shutter area, type: BoundingRectangle, the default value is new, Supermap3D.BoundingRectangle(0.0,0.0,1.0,1.0)
new
-
-
Get the slice height.
-
-
Get the slice width.
-
-
The way to get the data for the global division.
-
addLayer(layerObject, before, options)
-
Add layers.
Name |
Type |
Description |
layerObject |
Object
|
The layer parameter object conforming to the layer specification in the style of mapbox |
before |
String
|
Specify a target layer according to the ID, and place the new layer in front of the layer |
options |
Object
|
Other attributes of the layer |
-
getVisibleInViewport(index) → Boolean
-
Obtain the visibility of the viewport corresponding to the layer, which is mainly used in split screen and large screen display.
Name |
Type |
Description |
index |
Number
|
Index |
Returns:
Visiability
Throws:
-
queryRenderedFeatures(queryGeometry, params) → *
-
Query the rendered features based on geometric coordinates.
Name |
Type |
Description |
queryGeometry |
Array
|
Geographic coordinate point array |
params |
Array
|
Query filter conditions |
Returns:
-
querySourceFeatures(params)
-
Find characteristic features. According to the specified characteristics, query the elements on the map, and now supports fuzzy query.
Name |
Type |
Description |
params |
|
The specified feature feature is searched based on the feature. |
Example:
var result = mvtMap.querySourceFeatures({
sourceLayer: selectLayer.id, //Sublayer name
filter: ["like","NAME","Beijing"] //Set fuzzy query filter conditions. For example, you can find the elements with "Beijing" in the NAME attribute here.
})
-
-
Refresh the layer to make the modified map style take effect.
-
-
Remove the layer with the specified ID.
Name |
Type |
Description |
id |
String
|
ID of the layer to be removed |
-
setFilter(layerID, filter)
-
Set a filter for the layer with the specified ID.
Name |
Type |
Description |
layerID |
String
|
The ID of the layer whose filter is to be set |
filter |
Object
|
A filter parameter object conforming to the filter specification in mapbox style |
-
setLayoutProperty(layerId, name, value, options)
-
Set the layout style for the layer with the specified ID. Through this interface, you can set the text to display in a new line.
Name |
Type |
Description |
layerId |
String
|
The ID of the layer whose layout style is to be set |
name |
String
|
The name of the layout style |
value |
String
|
Layout style value |
options |
Object
|
Other options of a layout style parameter object conforming to the filter specification in mapbox style |
Example:
//Set the usage of text wrapping
mvt.setLayoutProperty (sublayer name,'text-max-width', the maximum number of characters in a single line of text)
mvt.setLayoutProperty("Gas Station Notes#1", 'text-max-width',5 )
// Set the text layer to not rotate along the line, with a default value of false
mvt.setLayoutProperty("ID of the text layer along the line", 'ignore-line-rotation', true/false )
// Set the position of the text layer along the line to be placed in the order defined by the vector data.
mvt.setLayoutProperty("ID of the text layer along the line", 'symbol-placement', 'line-direction')
-
setPaintProperty(layerId, name, value, options)
-
Set the canvas style for the layer with the specified ID.
Name |
Type |
Description |
layerId |
String
|
The ID of the layer whose canvas style is to be set. |
name |
String
|
The name of the canvas |
value |
String
|
Canvas value |
options |
Object
|
Other options of a canvas parameter object conforming to the filter specification in mapbox style |
-
setVisibleInViewport(index, visible)
-
Set the visibility of the viewport corresponding to the layer, which is mainly used for split screen and large screen display.
Name |
Type |
Description |
index |
Number
|
Index |
visible |
Boolean
|
Visiability |
Throws: