Skip to content

Commit 090059e

Browse files
authored
Merge pull request #1 from nickolanack/feature-new_events
Attache IOS delegate (and cleanup), Fix emit level selected event (ios and android)
2 parents b72c555 + 40925de commit 090059e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/map-view-common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ export abstract class MapViewBase extends View implements MapView {
359359
}
360360

361361
notifyIndoorLevelActivatedEvent(activateLevel: IndoorLevel) {
362-
let args: IndoorLevelActivatedEventData = { eventName: MapViewBase.indoorBuildingFocusedEvent, object: this, activateLevel: activateLevel };
362+
let args: IndoorLevelActivatedEventData = { eventName: MapViewBase.indoorLevelActivatedEvent, object: this, activateLevel: activateLevel };
363363
this.notify(args);
364364
}
365365
}

src/map-view.ios.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,29 +273,34 @@ export class MapView extends MapViewBase {
273273
protected _markers: Array<Marker> = new Array<Marker>();
274274

275275
private _delegate: MapViewDelegateImpl;
276+
private _indoorDelegate:IndoorDisplayDelegateImpl;
276277

277278
constructor() {
278279
super();
279280

280281
this.nativeView = GMSMapView.mapWithFrameCamera(CGRectZero, this._createCameraPosition());
281282
this._delegate = MapViewDelegateImpl.initWithOwner(new WeakRef(this));
283+
this._indoorDelegate = IndoorDisplayDelegateImpl.initWithOwner(new WeakRef(this));
282284
this.updatePadding();
283285
}
284286

285287
public onLoaded() {
286288
super.onLoaded();
287289
this.nativeView.delegate = this._delegate;
290+
this.nativeView.indoorDisplay.delegate = this._indoorDelegate;
288291
this.notifyMapReady();
289292
}
290293

291294
public onUnloaded() {
292295
this.nativeView.delegate = null;
296+
this.nativeView.indoorDisplay.delegate = null;
293297
super.onUnloaded();
294298
}
295299

296300
public disposeNativeView() {
297301
this._markers = null;
298302
this._delegate = null;
303+
this._indoorDelegate=null;
299304
super.disposeNativeView();
300305
GC();
301306
};

0 commit comments

Comments
 (0)