(layerInfo, addedCallback)
| 929 | } |
| 930 | |
| 931 | _createWMSLayer(layerInfo, addedCallback) { |
| 932 | this.webMapService |
| 933 | .getWmsInfo(layerInfo) |
| 934 | .then( |
| 935 | (result) => { |
| 936 | const layerId = layerInfo.layerID || layerInfo.name; |
| 937 | if (result) { |
| 938 | const wmsUrl = this._getWMSUrl(layerInfo, result.version); |
| 939 | this._addBaselayer({ url: [wmsUrl], layerID: layerId, visibility: layerInfo.visible, bounds: result.bounds }); |
| 940 | addedCallback && addedCallback(); |
| 941 | } |
| 942 | }, |
| 943 | (error) => { |
| 944 | addedCallback && addedCallback(); |
| 945 | throw new Error(error); |
| 946 | } |
| 947 | ) |
| 948 | .catch((error) => { |
| 949 | this.fire('layercreatefailed', { error, layer: layerInfo, map: this.map }); |
| 950 | }); |
| 951 | } |
| 952 | |
| 953 | _createVectorLayer(layerInfo, features) { |
| 954 | const type = layerInfo.featureType; |
no test coverage detected