{"id":13700382,"url":"https://github.com/openplans/Leaflet.AnimatedMarker","last_synced_at":"2025-05-04T18:35:07.806Z","repository":{"id":5414936,"uuid":"6605895","full_name":"openplans/Leaflet.AnimatedMarker","owner":"openplans","description":"A Leaflet plugin to animated a Marker along a polyline","archived":false,"fork":false,"pushed_at":"2022-01-12T20:56:45.000Z","size":196,"stargazers_count":376,"open_issues_count":27,"forks_count":110,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-14T11:29:55.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://openplans.github.com/Leaflet.AnimatedMarker/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openplans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-08T23:45:07.000Z","updated_at":"2025-03-19T10:04:37.000Z","dependencies_parsed_at":"2022-08-24T15:10:42.839Z","dependency_job_id":null,"html_url":"https://github.com/openplans/Leaflet.AnimatedMarker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openplans%2FLeaflet.AnimatedMarker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openplans%2FLeaflet.AnimatedMarker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openplans%2FLeaflet.AnimatedMarker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openplans%2FLeaflet.AnimatedMarker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openplans","download_url":"https://codeload.github.com/openplans/Leaflet.AnimatedMarker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252383198,"owners_count":21739288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T20:00:55.051Z","updated_at":"2025-05-04T18:35:02.792Z","avatar_url":"https://github.com/openplans.png","language":"CSS","funding_links":[],"categories":["CSS"],"sub_categories":[],"readme":"# Leaflet Animated Marker\n[![CDNJS](https://img.shields.io/cdnjs/v/leaflet.AnimatedMarker.svg)](https://cdnjs.com/libraries/leaflet.AnimatedMarker)\n\nThis is a Leaflet plugin for animating a marker along a polyline. Check out the [demo](http://openplans.github.com/Leaflet.AnimatedMarker/). Feedback appreciated!\n\n## How does it work?\n\nIt uses CSS3 animations to move the marker from point to point at a specific rate (meter per millisecond). For ancient browsers that don't support CSS3, the polyline is chunked into `distance` segments and moved per `interval` (not so great).\n\n## How can I use it?\n\nThe following code will create an AnimatedMarker that moves along `line`, assuming a `Leaflet.Map` called `map`.\n\n    var line = L.polyline([[40.68510, -73.94136],[40.68576, -73.94149],[40.68649, -73.94165]]),\n        animatedMarker = L.animatedMarker(line.getLatLngs());\n\n    map.addLayer(animatedMarker);\n\n## How do I change the rate?\n\n    var animatedMarker = L.animatedMarker(line.getLatLngs(), {\n      distance: 300,  // meters\n      interval: 2000, // milliseconds\n    });\n\n\n## What if I don't want it to animate right away? Or need to stop it halfway through?\n\n    var animatedMarker = L.animatedMarker(line.getLatLngs(), {\n      autoStart: false\n    });\n\n    // Start when you're ready\n    animatedMarker.start();\n\n    setTimeout(function() {\n      // Stop the animation\n      animatedMarker.stop();\n    }, 2000);\n\n## Can I give it a custom icon?\n\nYep! Just like a standard Leaflet.Marker layer.\n\n    var myIcon = L.icon({\n      iconUrl: 'myicon.png'\n    });\n\n    var animatedMarker = L.animatedMarker(line.getLatLngs(), {\n      icon: myIcon\n    });\n\n## Can I make the marker explode when it gets to the end of the line?\n\nSure! Just use the `onEnd` callback.\n\n    var animatedMarker = L.animatedMarker(line.getLatLngs(), {\n      onEnd: function() {\n        // TODO: blow up this marker\n      }\n    });\n    \n## Install via NPM\n\n```\nnpm install -S leaflet.animatedmarker\n```\n\n### Inclusion via npm\n\n```\nrequire('leaflet.animatedmarker/src/AnimatedMarker');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenplans%2FLeaflet.AnimatedMarker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenplans%2FLeaflet.AnimatedMarker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenplans%2FLeaflet.AnimatedMarker/lists"}