diff --git a/CHANGES.md b/CHANGES.md index 3a48af7..ba58193 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,6 @@ +## 0.0.8 +- Add catch for source not being ready + ## 0.0.7 - Make the `useSeviceBounds` option non-blocking so that data draws quicker and only the bounds check only gets applied to subsequent requests - Update build process and packaging diff --git a/package.json b/package.json index b1e0982..5d0ffa6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapbox-gl-arcgis-featureserver", - "version": "0.0.7", + "version": "0.0.8", "description": "A small library for requesting features from an arcgis feature server using tiles", "main": "dist/mapbox-gl-arcgis-featureserver.js", "module": "dist/mapbox-gl-arcgis-featureserver.esm.js", diff --git a/src/main.js b/src/main.js index 42b4bd7..b8b787e 100644 --- a/src/main.js +++ b/src/main.js @@ -302,13 +302,10 @@ export default class FeatureService { } _updateFcOnMap(fc) { - const source = this._map.getSource(this.sourceId); - if(source){ + const source = this._map.getSource(this.sourceId) + if (source) { source.setData(fc) } - else{ - console.warn(`Cannot find source with id: ${this.sourceId}`) - } } _doesTileOverlapBbox(tile, bbox) {