Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: [google-maps]: HtmlInfoWindow missing .on and .one methods #2034 #2035

Merged
merged 90 commits into from
Nov 1, 2017
Merged
Changes from 84 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
c7d1f23
Update index.ts
wf9a5m75 Jul 17, 2017
f20d61a
Update index.ts
wf9a5m75 Jul 17, 2017
17a06ec
Add missing features, and bug fix of methods
Jul 17, 2017
7dabc77
update: classname must be in pascal case
Jul 17, 2017
9897a1e
remove: duplicated class definition
Jul 17, 2017
c476025
export encode and spherical static classes
Jul 18, 2017
dde96b1
Add comma
Jul 18, 2017
ccee755
Fix Encoding and Spherical
ihadeed Jul 18, 2017
46127c0
Add convenience methods
ihadeed Jul 18, 2017
9216c00
Fix decorators for Encoding and Spherical
ihadeed Jul 18, 2017
1720dcc
Update: getMap() methods return the instance of the wrapper plugin
wf9a5m75 Jul 18, 2017
980f35d
Update: getMap() methods return the instance of the wrapper plugin
wf9a5m75 Jul 18, 2017
4b29aec
Remove `@CordovaInstance` decorators from getMap()
wf9a5m75 Jul 19, 2017
dd77ec4
Update: GoogleMapOptions (all fields are not optional).
wf9a5m75 Jul 19, 2017
93311ea
Follow up: version `2.0.0-beta2-20170719-2226` of cordova-plugin-goo…
wf9a5m75 Jul 20, 2017
2337316
Fix: tslint error
wf9a5m75 Jul 20, 2017
73a670b
Fix: tslint error
wf9a5m75 Jul 20, 2017
e679868
No more isAvailable() method.
Jul 20, 2017
06fb7d2
Merge remote-tracking branch 'upstream/master'
Jul 24, 2017
84500a8
Bug fix: description is incorrect
Jul 24, 2017
18843c1
Bug fix: example code was wrong.
Jul 24, 2017
da75beb
Bug fix: HtmlInfoWindow does not work
wf9a5m75 Jul 31, 2017
3e8a58c
Bug fix: HtmlInfoWindow does not work
wf9a5m75 Jul 31, 2017
732ac65
Bug fix: HtmlInfoWindow does not work
wf9a5m75 Jul 31, 2017
b4d8da9
Bug fix: HtmlInfoWindow does not work
wf9a5m75 Jul 31, 2017
30a674f
Bug fix: HtmlInfoWindow does not work
wf9a5m75 Jul 31, 2017
7d22ecc
It seems the ionViewDidLoad() is enough delayed after platform.ready()
Jul 31, 2017
81c2a92
Bug fix: map.setDiv()
Jul 31, 2017
57179a1
Bug fix: HtmlInfoWindow does not work
Aug 1, 2017
2c7e686
Bug fix: BaseArrayClass definition is incorrect
Aug 3, 2017
00bbbe6
Bug fix: BaseArrayClass constructor is wrong
Aug 4, 2017
dfacb6a
Bug fix: Geocoder class does not work
Aug 4, 2017
b3492d5
Bug fix: LatLngBounds constructor is wrong
Aug 4, 2017
56f8c5e
update: noNotify option is not declared
Aug 4, 2017
1aea5a1
Bug fix: Geocoder.geocode() returns array of GeocoderResult
Aug 4, 2017
181d910
Update: clarify acceptable parameters of BaseArrayClass
wf9a5m75 Aug 4, 2017
f334cc7
Add: AnimateCameraOption.padding is missing
wf9a5m75 Aug 4, 2017
985557f
Revert: BaseClass.empty() method does not have the noNotify option
wf9a5m75 Aug 4, 2017
52b1d15
Add `destruct` option to the CordovaOption.
wf9a5m75 Aug 8, 2017
d71f4c5
A semicolon is mixing
wf9a5m75 Aug 8, 2017
591386e
update: event names
wf9a5m75 Aug 8, 2017
2f3e3f5
Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), a…
wf9a5m75 Aug 8, 2017
73a21b1
Add: destruct option for otherPromise
wf9a5m75 Aug 9, 2017
77d12c5
Build for working group
wf9a5m75 Aug 11, 2017
13be911
Bug fix: map.getCameraTarget() definition is incorrect
wf9a5m75 Aug 21, 2017
b8d2e7a
Bug fix: The definition of VisibleRegion interface is incorrect
wf9a5m75 Aug 21, 2017
d23cfdd
Fix: LatLng, LatLngBounds, and PolylineOptions classes
wf9a5m75 Aug 21, 2017
5e72217
Bug fix: the definition of map.clear() method is incorrect
wf9a5m75 Aug 21, 2017
d97ea71
Fix: map.fromLatLngToPoint()
wf9a5m75 Aug 21, 2017
6314c9f
Ignore the dist directory on the master branch
wf9a5m75 Aug 21, 2017
d12f431
Remove the dist folder on the master branch
wf9a5m75 Aug 21, 2017
02c451d
Merge github.com:wf9a5m75/ionic-native into wf9a5m75-master
ihadeed Aug 24, 2017
471344c
fixes and tweaks
ihadeed Aug 26, 2017
affff9a
Merge pull request #1 from ionic-team/master
ihadeed Aug 26, 2017
8f877b0
Merge https://github.com/wf9a5m75/ionic-native into wf9a5m75-master
ihadeed Aug 26, 2017
85a5b6d
use union types for CameraPosition
ihadeed Aug 26, 2017
46e00a1
fix types
ihadeed Aug 26, 2017
20dcb40
update AnimateCameraOptions interface
ihadeed Aug 26, 2017
2fa7adc
remove AnimateCameraOptions interface
ihadeed Aug 26, 2017
ef21611
add MarkerCluster class
ihadeed Aug 26, 2017
c0991c2
Merge pull request #2 from ionic-team/wf9a5m75-master
wf9a5m75 Aug 26, 2017
517116b
Bug fix: Can not create an instance of BaseArrayClass
wf9a5m75 Aug 29, 2017
a4ae09e
Merge commit 'd891c3eea0372cf059709fd344c9bf4fab09ceae' of https://gi…
wf9a5m75 Aug 29, 2017
6665835
Merge commit '3a1034eab083deb6cb3bad02230cebe79e532b23'
wf9a5m75 Aug 31, 2017
3b1b8a0
Bug fix: the icons property of MarkerClusterOptions
wf9a5m75 Aug 31, 2017
7b0d9e4
Bug fix: the zoom option is missing
wf9a5m75 Sep 6, 2017
5e61532
Merge commit 'fdd12b58b3462c463bdd195c782f032c716cfabd'
wf9a5m75 Sep 6, 2017
c2e3084
Update index.ts
wf9a5m75 Sep 6, 2017
b359caa
fix: need to convert instance type from the JS class to the wrapper c…
wf9a5m75 Sep 8, 2017
32e91c2
Merge commit '07835207231d485d54579ea9b17586fdd1fc3cbf'
wf9a5m75 Sep 8, 2017
266ac95
remove test file
wf9a5m75 Sep 8, 2017
75e97e4
fix: Error: Illegal use of "@private" tag.
wf9a5m75 Sep 8, 2017
cc05636
fix: The Environment, Encode, and Spherical are static class
wf9a5m75 Sep 10, 2017
bae4cb6
fix: convert JS instance to the ionic instance
wf9a5m75 Sep 12, 2017
980ecf0
Merge commit '536a90636663a5cc536a0078ed86ad4e5e9bdbb0'
wf9a5m75 Oct 4, 2017
a47fc45
Documentation Error https://github.com/ionic-team/ionic-native/issues…
wf9a5m75 Oct 4, 2017
2f779aa
Need to create another way to convert the instance for marker cluster
wf9a5m75 Oct 5, 2017
1eb2153
save
wf9a5m75 Oct 5, 2017
733dd4b
Remove the instance of wrapper class if the JS instance is removed.
wf9a5m75 Oct 6, 2017
ef5b829
Bug fix: HtmlInfoWindow missing .on and .one methods
wf9a5m75 Oct 9, 2017
2f61306
Merge commit 'ef28078815536b1bd1a9c4efbcea815656b943e6'
wf9a5m75 Oct 9, 2017
ed662ab
Bug fix: HtmlInfoWindow constructor cause the error
wf9a5m75 Oct 13, 2017
92a4668
Merge commit '7243ed39600995e9a847b6d1de19cb160963ffe7'
wf9a5m75 Oct 23, 2017
2aec2c8
Fix: Error when removing map
wf9a5m75 Oct 26, 2017
a8d484d
Add: the cssOptions argument for HtmlInfoWindow.setContent() method
wf9a5m75 Oct 31, 2017
f1b1614
Bug fix: Polyline.getPoints(), Polygon.getPoints() and Polygon.getHol…
wf9a5m75 Oct 31, 2017
d9adf8d
Add: forEachAsync(), mapAsync(), and filterAsync() methods into BaseA…
wf9a5m75 Oct 31, 2017
7dc3173
update: use document.querySelector() instead of document.getElementBy…
wf9a5m75 Oct 31, 2017
10454c1
Fix: wait until the page is fully ready
wf9a5m75 Nov 1, 2017
848f9bc
Fix: missing `clickable` option for PolygonOptions and PolylineOptions
wf9a5m75 Nov 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 88 additions & 94 deletions src/@ionic-native/plugins/google-maps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ export class GoogleMaps extends IonicNativePlugin {
*/
create(element: string | HTMLElement, options?: GoogleMapOptions): GoogleMap {
let googleMap: GoogleMap = new GoogleMap(element, options);
googleMap.set('_overlays', new BaseArrayClass());
googleMap.set('_overlays', {});
return googleMap;
}

Expand Down Expand Up @@ -660,19 +660,17 @@ export class BaseClass {
let overlay: Marker = this.get(args[args.length - 1].getId());
if (!overlay) {
let markerJS: any = args[args.length - 1];
let markerId: string = markerJS.getId();
let markerCluster: MarkerCluster = <MarkerCluster>this;
overlay = new Marker(markerCluster.getMap(), markerJS);
this.get('_overlays').push(markerJS.getId());
this.set(markerJS.getId(), overlay);
this.get('_overlays')[markerId] = overlay;
markerJS.one(markerJS.getId() + '_remove', () => {
let idx = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(markerJS.getId(), undefined);
this.get('_overlays')[markerId] = null;
});
}
args[args.length - 1] = overlay;
} else {
args[args.length - 1] = this._objectInstance.getMap().get(args[args.length - 1].getId());
args[args.length - 1] = this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()];
}
}
observer.next(args);
Expand All @@ -696,19 +694,17 @@ export class BaseClass {
let overlay: Marker = this.get(args[args.length - 1].getId());
if (!overlay) {
let markerJS: any = args[args.length - 1];
let markerId: string = markerJS.getId();
let markerCluster: MarkerCluster = <MarkerCluster>this;
overlay = new Marker(markerCluster.getMap(), markerJS);
this.get('_overlays').push(markerJS.getId());
this.set(markerJS.getId(), overlay);
this.get('_overlays')[markerId] = overlay;
markerJS.one(markerJS.getId() + '_remove', () => {
let idx = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(markerJS.getId(), undefined);
this.get('_overlays')[markerId] = null;
});
}
args[args.length - 1] = overlay;
} else {
args[args.length - 1] = this._objectInstance.getMap().get(args[args.length - 1].getId());
args[args.length - 1] = this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()];
}
}
resolve(args);
Expand Down Expand Up @@ -757,19 +753,17 @@ export class BaseClass {
let overlay: Marker = this.get(args[args.length - 1].getId());
if (!overlay) {
let markerJS: any = args[args.length - 1];
let markerId: string = markerJS.getId();
let markerCluster: MarkerCluster = <MarkerCluster>this;
overlay = new Marker(markerCluster.getMap(), markerJS);
this.get('_overlays').push(markerJS.getId());
this.set(markerJS.getId(), overlay);
this.get('_overlays')[markerId] = overlay;
markerJS.one(markerJS.getId() + '_remove', () => {
let idx = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(markerJS.getId(), undefined);
this.get('_overlays')[markerId] = null;
});
}
args[args.length - 1] = overlay;
} else {
args[args.length - 1] = this._objectInstance.getMap().get(args[args.length - 1].getId());
args[args.length - 1] = this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()];
}
}
observer.next(args);
Expand All @@ -793,19 +787,17 @@ export class BaseClass {
let overlay: Marker = this.get(args[args.length - 1].getId());
if (!overlay) {
let markerJS: any = args[args.length - 1];
let markerId: string = markerJS.getId();
let markerCluster: MarkerCluster = <MarkerCluster>this;
overlay = new Marker(markerCluster.getMap(), markerJS);
this.get('_overlays').push(markerJS.getId());
this.set(markerJS.getId(), overlay);
this.get('_overlays')[markerId] = overlay;
markerJS.one(markerJS.getId() + '_remove', () => {
let idx = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(markerJS.getId(), undefined);
this.get('_overlays')[markerId] = null;
});
}
args[args.length - 1] = overlay;
} else {
args[args.length - 1] = this._objectInstance.getMap().get(args[args.length - 1].getId());
args[args.length - 1] = this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()];
}
}
resolve(args);
Expand Down Expand Up @@ -833,7 +825,7 @@ export class BaseClass {
destroy(): void {
let map: GoogleMap = this._objectInstance.getMap();
if (map) {
map.get('_overlays').set(this._objectInstance.getId(), undefined);
delete this._objectInstance.getMap().get('_overlays')[this._objectInstance.getId()];
}
this._objectInstance.remove();
}
Expand Down Expand Up @@ -1517,9 +1509,12 @@ export class GoogleMap extends BaseClass {
*/
@CordovaInstance()
remove(): Promise<any> {
this.get('_overlays').forEach((overlayId: string) => this.set(overlayId, null));
this.get('_overlays').empty();
this.set('_overlays', undefined);
if (this.get('_overlays')) {
Object.keys(this.get('_overlays')).forEach((overlayId: string) => {
this.get('_overlays')[overlayId] = null;
delete this.get('_overlays')[overlayId];
});
}
return new Promise<any>((resolve) => {
this._objectInstance.remove(() => resolve());
});
Expand All @@ -1531,8 +1526,12 @@ export class GoogleMap extends BaseClass {
*/
@InstanceCheck()
clear(): Promise<any> {
this.get('_overlays').forEach((overlayId: string) => this.set(overlayId, null));
this.get('_overlays').empty();
if (this.get('_overlays')) {
Object.keys(this.get('_overlays')).forEach((overlayId: string) => {
this.get('_overlays')[overlayId] = null;
delete this.get('_overlays')[overlayId];
});
}
return new Promise<any>((resolve) => {
this._objectInstance.clear(() => resolve());
});
Expand Down Expand Up @@ -1627,14 +1626,14 @@ export class GoogleMap extends BaseClass {
return new Promise<Marker>((resolve, reject) => {
this._objectInstance.addMarker(options, (marker: any) => {
if (marker) {
let markerId: string = marker.getId();
let overlayId: string = marker.getId();
const overlay: Marker = new Marker(this, marker);
this.get('_overlays').push(markerId);
this.set(markerId, overlay);
marker.one(markerId + '_remove', () => {
let idx: number = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(markerId, undefined);
this.get('_overlays')[overlayId] = overlay;
marker.one(overlayId + '_remove', () => {
if (this.get('_overlays')) {
this.get('_overlays')[overlayId] = null;
overlay.destroy();
}
});
resolve(overlay);
} else {
Expand All @@ -1649,13 +1648,14 @@ export class GoogleMap extends BaseClass {
return new Promise<MarkerCluster>((resolve, reject) => {
this._objectInstance.addMarkerCluster(options, (markerCluster: any) => {
if (markerCluster) {
let overlayId = markerCluster.getId();
const overlay = new MarkerCluster(this, markerCluster);
this.get('_overlays').push(markerCluster.getId());
this.set(markerCluster.getId(), overlay);
this.get('_overlays')[overlayId] = overlay;
markerCluster.one('remove', () => {
let idx: number = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(markerCluster.getId(), undefined);
if (this.get('_overlays')) {
this.get('_overlays')[overlayId] = null;
overlay.destroy();
}
});
markerCluster.set('_overlays', new BaseArrayClass());
resolve(overlay);
Expand All @@ -1675,14 +1675,14 @@ export class GoogleMap extends BaseClass {
return new Promise<Circle>((resolve, reject) => {
this._objectInstance.addCircle(options, (circle: any) => {
if (circle) {
let circleId: string = circle.getId();
let overlayId: string = circle.getId();
const overlay = new Circle(this, circle);
this.get('_overlays').push(circleId);
this.set(circleId, overlay);
circle.one(circleId + '_remove', () => {
let idx: number = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(circleId, undefined);
this.get('_overlays')[overlayId] = overlay;
circle.one(overlayId + '_remove', () => {
if (this.get('_overlays')) {
this.get('_overlays')[overlayId] = null;
overlay.destroy();
}
});
resolve(overlay);
} else {
Expand All @@ -1701,14 +1701,14 @@ export class GoogleMap extends BaseClass {
return new Promise<Polygon>((resolve, reject) => {
this._objectInstance.addPolygon(options, (polygon: any) => {
if (polygon) {
let polygonId: string = polygon.getId();
let overlayId: string = polygon.getId();
const overlay = new Polygon(this, polygon);
this.get('_overlays').push(polygonId);
this.set(polygonId, overlay);
polygon.one(polygonId + '_remove', () => {
let idx: number = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(polygonId, undefined);
this.get('_overlays')[overlayId] = overlay;
polygon.one(overlayId + '_remove', () => {
if (this.get('_overlays')) {
this.get('_overlays')[overlayId] = null;
overlay.destroy();
}
});
resolve(overlay);
} else {
Expand All @@ -1727,14 +1727,14 @@ export class GoogleMap extends BaseClass {
return new Promise<Polyline>((resolve, reject) => {
this._objectInstance.addPolyline(options, (polyline: any) => {
if (polyline) {
let polylineId: string = polyline.getId();
let overlayId: string = polyline.getId();
const overlay = new Polyline(this, polyline);
this.get('_overlays').push(polylineId);
this.set(polylineId, overlay);
polyline.one(polylineId + '_remove', () => {
let idx: number = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(polylineId, undefined);
this.get('_overlays')[overlayId] = overlay;
polyline.one(overlayId + '_remove', () => {
if (this.get('_overlays')) {
this.get('_overlays')[overlayId] = null;
overlay.destroy();
}
});
resolve(overlay);
} else {
Expand All @@ -1752,14 +1752,14 @@ export class GoogleMap extends BaseClass {
return new Promise<TileOverlay>((resolve, reject) => {
this._objectInstance.addTileOverlay(options, (tileOverlay: any) => {
if (tileOverlay) {
let tileOverlayId: string = tileOverlay.getId();
let overlayId: string = tileOverlay.getId();
const overlay = new TileOverlay(this, tileOverlay);
this.get('_overlays').push(tileOverlayId);
this.set(tileOverlayId, overlay);
tileOverlay.one(tileOverlayId + '_remove', () => {
let idx: number = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(tileOverlayId, undefined);
this.get('_overlays')[overlayId] = overlay;
tileOverlay.one(overlayId + '_remove', () => {
if (this.get('_overlays')) {
this.get('_overlays')[overlayId] = null;
overlay.destroy();
}
});
resolve(overlay);
} else {
Expand All @@ -1777,14 +1777,14 @@ export class GoogleMap extends BaseClass {
return new Promise<GroundOverlay>((resolve, reject) => {
this._objectInstance.addGroundOverlay(options, (groundOverlay: any) => {
if (groundOverlay) {
let groundOverlayId: string = groundOverlay.getId();
let overlayId: string = groundOverlay.getId();
const overlay = new GroundOverlay(this, groundOverlay);
this.get('_overlays').push(groundOverlayId);
this.set(groundOverlayId, overlay);
groundOverlay.one(groundOverlayId + '_remove', () => {
let idx: number = this.get('_overlays').indexOf(overlay);
this.get('_overlays').removeAt(idx);
this.set(groundOverlayId, undefined);
this.get('_overlays')[overlayId] = overlay;
groundOverlay.one(overlayId + '_remove', () => {
if (this.get('_overlays')) {
this.get('_overlays')[overlayId] = null;
overlay.destroy();
}
});
resolve(overlay);
} else {
Expand Down Expand Up @@ -1822,6 +1822,7 @@ export class GoogleMap extends BaseClass {
// });
// });
// }

}

/**
Expand Down Expand Up @@ -1938,7 +1939,7 @@ export class GroundOverlay extends BaseClass {
*/
@CordovaCheck()
remove(): void {
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
delete this._objectInstance.getMap().get('_overlays')[this.getId()];
this._objectInstance.remove();
this.destroy();
}
Expand All @@ -1953,18 +1954,11 @@ export class GroundOverlay extends BaseClass {
pluginRef: 'plugin.google.maps.HtmlInfoWindow',
repo: ''
})
export class HtmlInfoWindow<T> extends IonicNativePlugin {
private _objectInstance: any;
export class HtmlInfoWindow extends BaseClass {

constructor(initialData?: any) {
constructor() {
super();
if (checkAvailability(HtmlInfoWindow.getPluginRef(), null, HtmlInfoWindow.getPluginName()) === true) {
if (initialData instanceof GoogleMaps.getPlugin().HtmlInfoWindow) {
this._objectInstance = initialData;
} else {
this._objectInstance = new (HtmlInfoWindow.getPlugin())();
}
}
this._objectInstance = new (GoogleMaps.getPlugin().HtmlInfoWindow)();
}

/**
Expand Down Expand Up @@ -2122,7 +2116,7 @@ export class Marker extends BaseClass {
*/
@CordovaCheck()
remove(): void {
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
delete this._objectInstance.getMap().get('_overlays')[this.getId()];
this._objectInstance.remove();
this.destroy();
}
Expand Down Expand Up @@ -2244,7 +2238,7 @@ export class MarkerCluster extends BaseClass {
@InstanceCheck()
remove(): void {
this._objectInstance.set('_overlays', undefined);
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
delete this._objectInstance.getMap().get('_overlays')[this.getId()];
this._objectInstance.remove();
this.destroy();
}
Expand Down Expand Up @@ -2387,7 +2381,7 @@ export class Polygon extends BaseClass {
*/
@InstanceCheck()
remove(): void {
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
delete this._objectInstance.getMap().get('_overlays')[this.getId()];
this._objectInstance.remove();
this.destroy();
}
Expand Down Expand Up @@ -2548,7 +2542,7 @@ export class Polyline extends BaseClass {
*/
@InstanceCheck()
remove(): void {
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
delete this._objectInstance.getMap().get('_overlays')[this.getId()];
this._objectInstance.remove();
this.destroy();
}
Expand Down Expand Up @@ -2647,7 +2641,7 @@ export class TileOverlay extends BaseClass {
*/
@CordovaCheck()
remove(): void {
this._objectInstance.getMap().get('_overlays').set(this.getId(), undefined);
delete this._objectInstance.getMap().get('_overlays')[this.getId()];
this._objectInstance.remove();
this.destroy();
}
Expand Down