File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/components/gtt-client/init Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -76,14 +76,15 @@ function createLayers(this: any): void {
76
76
if ( config . source ) {
77
77
const SourceClass = olSource [ config . source as keyof typeof olSource ] as typeof olSource . Source ;
78
78
const sourceOptions = config . source_options ;
79
+ if ( config . format ) {
80
+ const FormatClass = olFormat [ config . format as keyof typeof olFormat ] as any ;
81
+ const formatOptions = config . format_options ;
82
+ layerOptions [ 'format' ] = new FormatClass ( formatOptions ) ;
83
+ ( sourceOptions as { format ?: any } ) [ 'format' ] = layerOptions [ 'format' ] ;
84
+ }
79
85
layerOptions [ 'source' ] = new SourceClass ( sourceOptions ) ;
80
86
}
81
87
82
- if ( config . format ) {
83
- const FormatClass = olFormat [ config . format as keyof typeof olFormat ] as any ;
84
- const formatOptions = config . format_options ;
85
- layerOptions [ 'format' ] = new FormatClass ( formatOptions ) ;
86
- }
87
88
88
89
const layer = new LayerClass ( layerOptions ) ;
89
90
You can’t perform that action at this time.
0 commit comments