fix(google-maps): fix issue when creating new instance of BaseArrayClass (#1931)

* Update index.ts

* Update index.ts

* Add missing features, and bug fix of methods

* update: classname must be in pascal case

* remove: duplicated class definition

* export encode and spherical static classes

* Add comma

* Fix Encoding and Spherical

* Add convenience methods

* Fix decorators for Encoding and Spherical

* Update: getMap() methods return the instance of the wrapper plugin

* Update: getMap() methods return the instance of the wrapper plugin

* Remove `@CordovaInstance` decorators from getMap()

* Update: GoogleMapOptions (all fields are not optional).

* Follow up:  version `2.0.0-beta2-20170719-2226` of cordova-plugin-googlemaps

* Fix: tslint error

* Fix: tslint error

* No more isAvailable() method.

* Bug fix: description is incorrect

* Bug fix: example code was wrong.

* Bug fix: HtmlInfoWindow does not work
https://github.com/ionic-team/ionic-native/pull/1815#issuecomment-318909795

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* Bug fix: HtmlInfoWindow does not work

* It seems the ionViewDidLoad() is enough delayed after platform.ready()

* Bug fix: map.setDiv()

* Bug fix: HtmlInfoWindow does not work

* Bug fix: BaseArrayClass definition is incorrect

* Bug fix: BaseArrayClass constructor is wrong

* Bug fix: Geocoder class does not work

* Bug fix: LatLngBounds constructor is wrong

* update: noNotify option is not declared

* Bug fix: Geocoder.geocode() returns array of GeocoderResult

* Update: clarify acceptable parameters of BaseArrayClass

* Add: AnimateCameraOption.padding is missing

* Revert: BaseClass.empty() method does not have the noNotify option

* Add `destruct` option to the CordovaOption.

- This allows BaseClass.on() is able to pass multiple retuned values from the cordova plugin side to the event lister.

* A semicolon is mixing

* update: event names

* Update: BaseClass.addEventListener(), addEventListenerOnce(), on(), and one()

* Add: destruct option for otherPromise
Change: inside event names (must use the version 2.0.0-beta3-20170808-1950 or higher)

* Build for working group

* Bug fix: map.getCameraTarget() definition is incorrect

* Bug fix: The definition of VisibleRegion interface is incorrect

* Fix: LatLng, LatLngBounds, and PolylineOptions classes
Update: map.getVisibleRegion()

Add: VisibleRegion class

* Bug fix: the definition of map.clear() method is incorrect

* Fix: map.fromLatLngToPoint()

* Ignore the dist directory on the master branch

* Remove the dist folder on the master branch

* fixes and tweaks

* use union types for CameraPosition

fixes issue mentioned on slack by @wf9a5m75

* fix types

* update AnimateCameraOptions interface

* remove AnimateCameraOptions interface

* add MarkerCluster class

* Bug fix: Can not create an instance of BaseArrayClass
This commit is contained in:
Masashi Katsumata 2017-08-29 15:58:44 -07:00 committed by Ibby Hadeed
parent d891c3eea0
commit 957396b5e5

View File

@ -524,10 +524,6 @@ export const GoogleMapsMapTypeId: { [mapType: string]: MapType; } = {
* map: GoogleMap; * map: GoogleMap;
* mapElement: HTMLElement; * mapElement: HTMLElement;
* constructor(private googleMaps: GoogleMaps) { } * constructor(private googleMaps: GoogleMaps) { }
* // Load the map when the platform is ready
* this.platform.ready().then(() => {
* this.loadMap();
* });
* *
* ionViewDidLoad() { * ionViewDidLoad() {
* this.loadMap(); * this.loadMap();
@ -788,7 +784,7 @@ export class BaseArrayClass<T> extends BaseClass {
if (initialData instanceof GoogleMaps.getPlugin().BaseArrayClass) { if (initialData instanceof GoogleMaps.getPlugin().BaseArrayClass) {
this._objectInstance = initialData; this._objectInstance = initialData;
} else { } else {
this._objectInstance = GoogleMaps.getPlugin().BaseArrayClass(initialData); this._objectInstance = new (GoogleMaps.getPlugin().BaseArrayClass)(initialData);
} }
} }