Skip to content

Commit

Permalink
TilesRendererBase url constructor parameter should be optional (#812
Browse files Browse the repository at this point in the history
)

* URL should be optional

* update Google examples
  • Loading branch information
RodrigoHamuy authored Oct 17, 2024
1 parent 82884e1 commit 76d4473
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example/googleMapsAerial.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GeoUtils, WGS84_ELLIPSOID, GooglePhotorealisticTilesRenderer, GoogleCloudAuthPlugin } from '../src/index.js';
import { GeoUtils, WGS84_ELLIPSOID, TilesRenderer, GoogleCloudAuthPlugin } from '../src/index.js';
import {
Scene,
WebGLRenderer,
Expand Down Expand Up @@ -42,7 +42,7 @@ function reinstantiateTiles() {

}

tiles = new GooglePhotorealisticTilesRenderer();
tiles = new TilesRenderer();
tiles.registerPlugin( new GoogleCloudAuthPlugin( { apiToken: params.apiKey } ) );
tiles.registerPlugin( new TileCompressionPlugin() );
tiles.registerPlugin( new TilesFadePlugin() );
Expand Down
4 changes: 2 additions & 2 deletions example/googleMapsExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
CAMERA_FRAME,
GeoUtils,
GlobeControls,
GooglePhotorealisticTilesRenderer,
TilesRenderer,
GoogleCloudAuthPlugin,
} from '../src/index.js';
import {
Expand Down Expand Up @@ -55,7 +55,7 @@ function reinstantiateTiles() {

localStorage.setItem( 'googleApiKey', params.apiKey );

tiles = new GooglePhotorealisticTilesRenderer();
tiles = new TilesRenderer();
tiles.registerPlugin( new GoogleCloudAuthPlugin( { apiToken: params.apiKey, autoRefreshToken: true } ) );
tiles.registerPlugin( new TileCompressionPlugin() );
tiles.registerPlugin( new UpdateOnChangePlugin() );
Expand Down
2 changes: 1 addition & 1 deletion src/base/TilesRendererBase.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class TilesRendererBase {
parseQueue : PriorityQueue;
downloadQueue : PriorityQueue;

constructor( url : String );
constructor( url?: String );
update() : void;
registerPlugin( plugin: Object ) : void;
unregisterPlugin( plugin: Object | String ) : Boolean;
Expand Down

0 comments on commit 76d4473

Please sign in to comment.