MCPcopy
hub / github.com/visgl/deck.gl / _getViews

Method _getViews

modules/mapbox/src/mapbox-overlay.ts:262–274  ·  view source on GitHub ↗
(map: Map)

Source from the content-addressed store, hash-verified

260 };
261
262 private _getViews(map: Map) {
263 if (!this._props.views) {
264 return getDefaultView(map);
265 }
266 // Check if custom views already include a 'mapbox' view
267 const views = Array.isArray(this._props.views) ? this._props.views : [this._props.views];
268 const hasMapboxView = views.some((v: any) => v.id === MAPBOX_VIEW_ID);
269 if (hasMapboxView) {
270 return this._props.views;
271 }
272 // Add default 'mapbox' view to custom views for consistency with interleaved mode
273 return [getDefaultView(map), ...views];
274 }
275
276 private _updateViewState = () => {
277 const deck = this._deck;

Callers 4

setPropsMethod · 0.95
_onAddOverlaidMethod · 0.95
_onAddInterleavedMethod · 0.95
MapboxOverlayClass · 0.95

Calls 1

getDefaultViewFunction · 0.90

Tested by

no test coverage detected