VectorTilesMap

new Cesium.VectorTilesMap(options)

Vector tile map class. Reference to various specifications in mapbox's style: "https://docs.mapbox.com/mapbox-gl-js/style-spec/".
Name Type Description
options The parameter object contains the following properties:
Name Type Default Description
url String It is suitable for generating mvt data through SuperMap desktop software and publishing it as a rest-style map service through iServer.
url String The service address is applicable to WMTS services published by third parties.
layer String The layer name is applicable to WMTS services published by third parties.
layerConfig String Layer configuration file.
provider String Map service provider.
name String The name of the map.
tileWidth String The tile width is suitable for WMTS services released by third parties.
tileHeight String The tile height is suitable for WMTS services released by third parties.
format String 'mvt' optional Applicable to WMTS services published by third parties.
tilematrxset String The name of the slicing matrix set is applicable to WMTS services published by third parties.

Members

showCallout : Boolean

Gets or sets whether to display the leader line.

style3D : Object

Get or set the display style.
See:

Methods

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","京"] //Set fuzzy query filter conditions. For example, you can find the elements with "京" in the NAME attribute here.
})

removeLayer(id)

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("加油站注记#1", 'text-max-width',5 )

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: