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

How to use the events (start, end, loop)? #25

Closed
gcivicodev opened this issue Aug 2, 2017 · 0 comments
Closed

How to use the events (start, end, loop)? #25

gcivicodev opened this issue Aug 2, 2017 · 0 comments

Comments

@gcivicodev
Copy link

gcivicodev commented Aug 2, 2017

Hi @ewoken

I am using your plugin in ionic v1 project. How can I use the events (start, end, loop)?
I am using this code:

leafletData.getMap('app-map').then(
    function(map) {
        // more code here ...
        var trolleyIcon = L.icon({iconUrl: 'http://www.freeiconspng.com/uploads/bus-icon-10.png',iconSize:[64,64]});
        trolley = L.Marker.movingMarker(routeTest,[2000],{type:'trolley',icon:trolleyIcon}).bindPopup(
            'This is the Trolley!'
        ).addTo(map);
        trolley.start();
        trolley.on('start',function(e) {
            console.log('start event',e);
        });
        trolley.on('end',function(e) {
            console.log('end event',e);
        });
    }
);

I tried:

trolley.on('end',function(e) {
        console.log(e);
});

But nothing happen.

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

No branches or pull requests

1 participant