Overlay that streams Google Maps 2D tile imagery on top of 3D tile geometry using the Google Maps Tile API.
import { TilesRenderer } from '3d-tiles-renderer/three';
import { GeneratedSurfacePlugin, GoogleMapsOverlay } from '3d-tiles-renderer/three/plugins';
const tiles = new TilesRenderer();
tiles.registerPlugin( new GeneratedSurfacePlugin( {
overlay: new GoogleMapsOverlay( {
apiToken: 'YOUR_GOOGLE_API_KEY',
sessionOptions: { mapType: 'satellite', language: 'en-US', region: 'US' },
} ),
applyOverlayTexture: true,
} ) );On this page
Methods
new GoogleMapsOverlay(
options?: {
// Google Maps API key.
apiToken?: string,
// Session creation options passed to the Google Maps Tile API when establishing a tile session.
sessionOptions?: Object,
// Automatically refresh the session token before it expires.
autoRefreshToken: boolean = false,
// URL to a Google logo image. If provided, it is included in the overlay attributions as required by Google's terms of service.
logoUrl: string = null,
// Overlay opacity (0–1).
opacity: number = 1,
// Tint color.
color: number | Color = 0xffffff,
// Planar projection frame. If null, cartographic projection is used.
frame: Matrix4 = null,
// URL rewriting callback.
preprocessURL: function = null,
// Use alpha channel as a surface mask.
alphaMask: boolean = false,
// Invert the alpha channel.
alphaInvert: boolean = false
}
)Inherited
From ImageOverlay
- Properties