Plugin for authenticating requests to the Google Cloud Maps APIs, including the Photorealistic 3D Tiles and 2D Map Tiles APIs. Handles session-token management, per-tile attribution collection, and optional logo attribution.
import { TilesRenderer } from '3d-tiles-renderer/three';
import { GoogleCloudAuthPlugin } from '3d-tiles-renderer/core/plugins';
const tiles = new TilesRenderer();
tiles.registerPlugin( new GoogleCloudAuthPlugin( {
apiToken: 'YOUR_GOOGLE_API_KEY',
autoRefreshToken: true,
} ) );Properties
apiToken: string
The Google Cloud API key.
useRecommendedSettings: boolean
Whether to apply recommended renderer settings for photorealistic tiles.
logoUrl: string | null
URL of a logo image to include in attribution output, or null if not set.
tiles: Object | null
The TilesRenderer instance this plugin is registered with.
Methods
new GoogleCloudAuthPlugin(
options: {
apiToken: string,
sessionOptions: Object | null = null,
autoRefreshToken: boolean = false,
logoUrl: string | null = null,
useRecommendedSettings: boolean = true
}
)