@deck.gl/carto 8.7.0-beta.2 → 8.7.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.dev.js +33 -21
- package/dist/es5/api/maps-api-common.js +7 -1
- package/dist/es5/api/maps-api-common.js.map +1 -1
- package/dist/es5/index.js +8 -0
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/layers/carto-layer.js +3 -4
- package/dist/es5/layers/carto-layer.js.map +1 -1
- package/dist/esm/api/maps-api-common.js +5 -0
- package/dist/esm/api/maps-api-common.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layers/carto-layer.js +3 -3
- package/dist/esm/layers/carto-layer.js.map +1 -1
- package/dist.min.js +1 -1
- package/package.json +2 -2
- package/src/api/maps-api-common.js +6 -0
- package/src/index.js +1 -0
- package/src/layers/carto-layer.js +9 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@deck.gl/carto",
|
|
3
3
|
"description": "CARTO official integration with Deck.gl. Build geospatial applications using CARTO and Deck.gl.",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "8.7.0-beta.
|
|
5
|
+
"version": "8.7.0-beta.3",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"@deck.gl/layers": "^8.0.0",
|
|
50
50
|
"@loaders.gl/core": "^3.1.5"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "32879c662f37d4c912cf702c220a75d6cd0a67bc"
|
|
53
53
|
}
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export {getDefaultCredentials, setDefaultCredentials} from './config.js';
|
|
2
2
|
export {default as CartoLayer} from './layers/carto-layer';
|
|
3
|
+
export {default as _CartoDynamicTileLayer} from './layers/carto-dynamic-tile-layer';
|
|
3
4
|
export {default as BASEMAP} from './basemap';
|
|
4
5
|
export {default as colorBins} from './style/color-bins-style';
|
|
5
6
|
export {default as colorCategories} from './style/color-categories-style';
|
|
@@ -3,7 +3,7 @@ import CartoDynamicTileLayer from './carto-dynamic-tile-layer';
|
|
|
3
3
|
import {MVTLayer} from '@deck.gl/geo-layers';
|
|
4
4
|
import {GeoJsonLayer} from '@deck.gl/layers';
|
|
5
5
|
import {fetchLayerData, getDataV2, API_VERSIONS} from '../api';
|
|
6
|
-
import {FORMATS, MAP_TYPES} from '../api/maps-api-common';
|
|
6
|
+
import {FORMATS, MAP_TYPES, TILE_FORMATS} from '../api/maps-api-common';
|
|
7
7
|
import {getDefaultCredentials} from '../config';
|
|
8
8
|
|
|
9
9
|
const defaultProps = {
|
|
@@ -128,11 +128,17 @@ export default class CartoLayer extends CompositeLayer {
|
|
|
128
128
|
|
|
129
129
|
if (!data) return null;
|
|
130
130
|
|
|
131
|
-
const {
|
|
131
|
+
const {updateTriggers} = this.props;
|
|
132
132
|
|
|
133
133
|
let layer;
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
/* global URLSearchParams */
|
|
136
|
+
const tilesFormat =
|
|
137
|
+
apiVersion === API_VERSIONS.V3 &&
|
|
138
|
+
format === FORMATS.TILEJSON &&
|
|
139
|
+
new URLSearchParams(data.tiles[0]).get('format');
|
|
140
|
+
|
|
141
|
+
if (tilesFormat && tilesFormat !== TILE_FORMATS.MVT) {
|
|
136
142
|
layer = CartoDynamicTileLayer;
|
|
137
143
|
} else if (
|
|
138
144
|
apiVersion === API_VERSIONS.V1 ||
|