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

feat(google-maps): add missing features and fix wrong definitions #1815

Merged
merged 18 commits into from
Jul 21, 2017
Merged
Changes from 1 commit
Commits
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
12 changes: 11 additions & 1 deletion src/@ionic-native/plugins/google-maps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,11 +712,21 @@ export class BaseClass {
*/
export class Circle extends BaseClass {

constructor(_objectInstance: any) {
private _map: GoogleMap;

constructor(_map: GoogleMap, _objectInstance: any) {
super();
this._map = _map;
this._objectInstance = _objectInstance;
}

/**
* Return the map instance.
* @return {GoogleMap}
*/
@CordovaInstance({ sync: true })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the @CordovaIntance decorator from the getMap methods.

Cordova, CordovaInstance, CordovaProperty and InstanceProperty decorators override your custom definition. Since you are defining your own functionality here, you have to remove the decorators.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you tell me how different each decorators Cordova, CordovaInstance, CordovaProperty and InstanceProperty?
Where should I read the document?

getMap(): any { return this._map; }

/**
* Change the center position.
* @param latLng {ILatLng}
Expand Down