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

adding dragEnd event to agm #1187

Closed
matishw opened this issue Oct 3, 2017 · 3 comments
Closed

adding dragEnd event to agm #1187

matishw opened this issue Oct 3, 2017 · 3 comments
Labels

Comments

@matishw
Copy link

matishw commented Oct 3, 2017

hello all,
i add the event follow this example https://github.com/SebastianM/angular-google-maps/pull/1159/files
but still the change did not show up. how can i rebuild the project that the changes will included?

@markmssd
Copy link

markmssd commented Nov 6, 2017

@matishw did you figure it out? I'm about to add more events to markers as well, so I'm interested in this.

@LiadIdan
Copy link
Contributor

@matishw you can clone the repo from my profile and use npm/yarn to build it, although I suggest you to wait for this PR to be merged. in the meanwhile, you can use this workaround:

@ViewChild(AgmMap) map: any;
private dragEndSubscription: Subscription;

ngOnInit() {
  this.dragEndSubscription = (this.map._mapsWrapper as GoogleMapsAPIWrapper) 
    .subscribeToMapEvent('dragend')
    .subscribe(() => // Your logic goes here);
}

ngOnDestroy() {
  this.dragEndSubscription.unsubscribe();
}

@stale
Copy link

stale bot commented Nov 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2018
@stale stale bot closed this as completed Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants