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
173
173
@nativeProperty profile : string ;
174
174
@nativeProperty customServiceURL : string ;
175
175
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
+ }
177
181
}
178
182
}
179
183
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export class MultiValhallaOfflineRoutingService extends ValhallaRoutingService<a
98
98
}
99
99
100
100
export interface ValhallaOnlineRoutingServiceOptions extends ValhallaRoutingServiceOptions {
101
- apiKey : string ;
101
+ apiKey ? : string ;
102
102
customServiceURL ?: string ;
103
103
}
104
104
export class ValhallaOnlineRoutingService extends ValhallaRoutingService < any , ValhallaOnlineRoutingServiceOptions > {
You can’t perform that action at this time.
0 commit comments