(info, layerInfo, featureType)
| 2808 | } |
| 2809 | |
| 2810 | _createMvtLayer(info, layerInfo, featureType) { |
| 2811 | const style = this._getDataVectorTileStyle(featureType); |
| 2812 | const paint = this._transformStyleToMapBoxGl(style, featureType); |
| 2813 | let url = info.url + '/tileFeature.mvt'; |
| 2814 | const origin = mapRepo.CRS.get(this.baseProjection).getOrigin(); |
| 2815 | const { minzoom, maxzoom } = layerInfo; |
| 2816 | url += `?&returnAttributes=true&width=512&height=512&x={x}&y={y}&scale={scale}&origin={x:${origin[0]},y:${origin[1]}}`; |
| 2817 | this._addLayer({ |
| 2818 | id: layerInfo.layerID, |
| 2819 | type: style.mbglType, |
| 2820 | source: { |
| 2821 | type: 'vector', |
| 2822 | tiles: [url], |
| 2823 | proxy: this.webMapService.handleProxy('image') |
| 2824 | }, |
| 2825 | 'source-layer': `${info.datasetName}@${info.datasourceName}`, |
| 2826 | paint, |
| 2827 | layout: { |
| 2828 | visibility: layerInfo.visible ? 'visible' : 'none' |
| 2829 | }, |
| 2830 | minzoom: minzoom || 0, |
| 2831 | maxzoom: maxzoom || this.map.getMaxZoom() + 1 |
| 2832 | }); |
| 2833 | this._addLayerSucceeded(); |
| 2834 | } |
| 2835 | |
| 2836 | _getDataVectorTileStyle(featureType) { |
| 2837 | const styleParameters = { |
no test coverage detected