Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

How to access Marker Methods such as "setAnimation" #277

Closed
tbadaczewski opened this issue Feb 23, 2014 · 4 comments
Closed

How to access Marker Methods such as "setAnimation" #277

tbadaczewski opened this issue Feb 23, 2014 · 4 comments

Comments

@tbadaczewski
Copy link

I can access map methods by using the "control" parameter and the "getGMap" object. How can I do the same for a marker in a directive?

Something like:

                        marker.onClicked = function () {
                            $scope.$apply(function () {
                                marker.control.getGMarker().setAnimation("...");
                            });
                        };
@kuceram
Copy link

kuceram commented Feb 24, 2014

+1 👍

@nmccready
Copy link
Contributor

This is currently not implemented for the other directives. The control was very recently added to the map directive. However, I believe there is a pull request in which will allow a marker to be passed into the marker.onClick callback.

marker.onClicked = function (gMarker) {
                                gMarker.setAnimation("...");
};

@nmccready
Copy link
Contributor

Also it does not make much sense to do control on the marker directive as it is mainly being used via ng-repeat. The control would not be one to one on a marker.

@nmccready
Copy link
Contributor

I will close this a dupe due to #257 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants