@@ -12,8 +12,7 @@ import {
12
12
IgcAzureMapsImagery ,
13
13
IgcGeographicMapComponent ,
14
14
IgcGeographicMapModule ,
15
- IgcGeographicTileSeriesComponent ,
16
- IgcTileSeriesComponent
15
+ IgcGeographicTileSeriesComponent
17
16
} from 'igniteui-webcomponents-maps' ;
18
17
import 'igniteui-webcomponents/themes/light/bootstrap.css' ;
19
18
import { MapRegion , MapUtils } from './MapUtils' ;
@@ -159,16 +158,28 @@ export class MapDisplayImageryAzureTiles {
159
158
style === AzureMapsImageryStyle . Road ||
160
159
style === AzureMapsImageryStyle . DarkGrey
161
160
) {
162
- this . map . series . clear ( ) ;
161
+ this . imagerySeries . tileImagery = tileSource ; //no additional background
162
+ }
163
+ else if (
164
+ style === AzureMapsImageryStyle . TrafficDelayOverlay ||
165
+ style === AzureMapsImageryStyle . TrafficAbsoluteOverlay ||
166
+ style === AzureMapsImageryStyle . TrafficReducedOverlay ||
167
+ style === AzureMapsImageryStyle . TrafficRelativeOverlay ||
168
+ style === AzureMapsImageryStyle . WeatherInfraredOverlay ||
169
+ style === AzureMapsImageryStyle . WeatherRadarOverlay
170
+ ) {
171
+ const bgImagery = new IgcAzureMapsImagery ( ) ;
172
+ bgImagery . imageryStyle = AzureMapsImageryStyle . DarkGrey ;
173
+ bgImagery . apiKey = this . apiKey ?? '' ;
163
174
this . imagerySeries . tileImagery = tileSource ;
164
- this . map . series . add ( this . imagerySeries ) ;
175
+ this . map . backgroundContent = bgImagery ; //background dark grey
165
176
}
166
177
else {
167
178
const bgImagery = new IgcAzureMapsImagery ( ) ;
168
- bgImagery . imageryStyle = AzureMapsImageryStyle . Road ;
179
+ bgImagery . imageryStyle = AzureMapsImageryStyle . Satellite ;
169
180
bgImagery . apiKey = this . apiKey ?? '' ;
170
181
this . imagerySeries . tileImagery = tileSource ;
171
- this . map . backgroundContent = bgImagery ;
182
+ this . map . backgroundContent = bgImagery ; //background satellite
172
183
}
173
184
}
174
185
}
0 commit comments