Google3dTilesProvider Class @beta
Will provide Google Photorealistic 3D Tiles (in 3dTile format). A valid API key or getAuthToken fuction must be supplied when creating this provider. To use this provider, you must register it with realityDataSourceProviders. Example usage:
export async function setUpGoogle3dTilesProviderWithApiKey(viewport: Viewport, apiKey: string) {
// Specify your API key in the provider options
const provider = new Google3dTilesProvider({ apiKey });
// The provider must be initialized before attaching, to load imagery for its decorator
await provider.initialize();
// Register the provider with a name that will also be used to attach the reality model
IModelApp.realityDataSourceProviders.register("google3dTiles", provider);
// This function just provides the Google 3D Tiles URL, or you can get it another way via a service, etc.
const url = getGoogle3dTilesUrl();
viewport.displayStyle.attachRealityModel({
tilesetUrl: url,
name: "google3dTiles",
rdSourceKey: {
// provider property must be the same name you registered your provider under
provider: "google3dTiles",
format: "ThreeDTile",
id: url,
},
});
}
@see Google Photorealistic 3D Tiles
Implements
Methods
Name | Description | |
---|---|---|
constructor(options: Google3dTilesProviderOptions): Google3dTilesProvider | ||
addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> | Optionally add attribution logo cards to the viewport's logo div. | |
createRealityDataSource(key: RealityDataSourceKey, iTwinId: string): Promise<undefined | RealityDataSource> | Produce a RealityDataSource for the specified key . |
|
decorate(_context: DecorateContext): void | Optionally add any decorations specific to this reality data source provider. | |
initialize(): Promise<boolean> | Initialize the Google 3D Tiles reality data source provider by activating its decorator, which consists of loading the correct Google Maps logo. |
Properties
Name | Type | Description | |
---|---|---|---|
useCachedDecorations Readonly | "true" | Enables cached decorations for this provider. |
Defined in
Last Updated: 03 July, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.