File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,11 @@ export class ValhallaOnlineRoutingService extends ValhallaRoutingService<com.car
173173 @nativeProperty profile : string ;
174174 @nativeProperty customServiceURL : string ;
175175 createNative ( options : ValhallaOnlineRoutingServiceOptions ) {
176- return new com . carto . routing . ValhallaOnlineRoutingService ( options . apiKey ) ;
176+ if ( options . apiKey ) {
177+ return new com . carto . routing . ValhallaOnlineRoutingService ( options . apiKey ) ;
178+ } else {
179+ return new com . carto . routing . ValhallaOnlineRoutingService ( ) ;
180+ }
177181 }
178182}
179183
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export class MultiValhallaOfflineRoutingService extends ValhallaRoutingService<a
9898}
9999
100100export interface ValhallaOnlineRoutingServiceOptions extends ValhallaRoutingServiceOptions {
101- apiKey : string ;
101+ apiKey ? : string ;
102102 customServiceURL ?: string ;
103103}
104104export class ValhallaOnlineRoutingService extends ValhallaRoutingService < any , ValhallaOnlineRoutingServiceOptions > {
You can’t perform that action at this time.
0 commit comments