File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 322
322
this . webMapInfo = null ;
323
323
} else if ( mapId !== null && typeof mapId === 'object' ) {
324
324
this . webMapInfo = mapId ;
325
+ this . mapId = '' ;
325
326
}
326
327
this . webMapService . setMapId ( mapId ) ;
327
328
if ( ! mapId ) {
406
407
* @private
407
408
*/
408
409
const WebMapFactory = this . _createWebMapFactory ( type ) ;
409
- this . _handler = new WebMapFactory ( this . mapId , commonOptions , mapOptions ) ;
410
- // this._handler.setEventedParent(this );
410
+ const mapId = this . mapId || this . webMapInfo ;
411
+ this . _handler = new WebMapFactory ( mapId , commonOptions , mapOptions ) ;
411
412
for ( const type in commonEvents ) {
412
413
this . _handler . on ( type , commonEvents [ type ] ) ;
413
414
}
Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ describe('WebMapBaseSpec.js', () => {
355
355
webMapBase . setMapId ( mapId ) ;
356
356
jasmine . clock ( ) . tick ( 10 ) ;
357
357
expect ( spy . calls . count ( ) ) . toBe ( 1 ) ;
358
- expect ( webMapBase . mapId ) . toBe ( id ) ;
358
+ expect ( webMapBase . mapId ) . toBe ( '' ) ;
359
359
expect ( webMapBase . webMapInfo ) . toEqual ( mapId ) ;
360
360
jasmine . clock ( ) . uninstall ( ) ;
361
361
done ( ) ;
You can’t perform that action at this time.
0 commit comments