{"id":16015012,"url":"https://github.com/louismazel/vue2-leaflet-movingmarker","last_synced_at":"2025-04-05T03:22:01.456Z","repository":{"id":32800552,"uuid":"143017501","full_name":"LouisMazel/vue2-leaflet-movingmarker","owner":"LouisMazel","description":"MovingMarker plugin extension for vue2-leaflet package","archived":false,"fork":false,"pushed_at":"2022-12-29T19:15:58.000Z","size":977,"stargazers_count":24,"open_issues_count":17,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-23T16:43:38.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://louismazel.github.io/vue2-leaflet-movingmarker/","language":"Vue","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/LouisMazel.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":"2018-07-31T13:24:43.000Z","updated_at":"2023-10-16T08:55:08.000Z","dependencies_parsed_at":"2023-01-14T22:30:53.909Z","dependency_job_id":null,"html_url":"https://github.com/LouisMazel/vue2-leaflet-movingmarker","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/LouisMazel%2Fvue2-leaflet-movingmarker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisMazel%2Fvue2-leaflet-movingmarker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisMazel%2Fvue2-leaflet-movingmarker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LouisMazel%2Fvue2-leaflet-movingmarker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LouisMazel","download_url":"https://codeload.github.com/LouisMazel/vue2-leaflet-movingmarker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247281572,"owners_count":20913195,"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-10-08T15:05:53.657Z","updated_at":"2025-04-05T03:22:01.439Z","avatar_url":"https://github.com/LouisMazel.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue2-leaflet-movingmarker\n\nThis is a [movingmarker plugin](https://gitlab.com/IvanSanchez/Leaflet.Marker.SlideTo) extension for [vue2-leaflet package](https://github.com/KoRiGaN/Vue2Leaflet)\n\n## Install\n```bash\nnpm install --save vue2-leaflet-movingmarker\n```\n\n## Demo\n\n[Enjoy here](https://louismazel.github.io/vue2-leaflet-movingmarker/)\nYou can see the demo code in the file [Map.vue](./src/Map/index.vue)\n\n## Usage\n\n### on \u0026lt;template\u0026gt; add\n\nsomething like this\n```html\n\u003cl-map :zoom=10 :center=\"initialLocation\"\u003e\n  \u003cl-tile-layer url=\"http://{s}.tile.osm.org/{z}/{x}/{y}.png\" /\u003e\n  \u003cl-moving-marker\n      v-for=\"driver in drivers\"\n      :key=\"driver.uuid\"\n      v-if=\"driver.location\"\n      :lat-lng=\"getLocation(driver)\"\n      :icon=\"getIcon(driver.uuid)\"\n      @click=\"setCurrentDriver(driver)\"\n      ref=\"driverMarker\"\n      :duration=\"2000\"\n  /\u003e\n\u003c/l-map\u003e\n```\n### on \u0026lt;script\u0026gt; add\n\n#### option 1\n\nIn the same template file, at `\u003cscript\u003e` part, this will make the component available only to the template in this file\n\n```js\nimport LMovingMarker from 'vue2-leaflet-movingmarker'\n...\nexport default {\n  ...\n  components: {\n    LMovingMarker\n    ...\n  },\n  ...\n}\n```\n#### option 2\n\nAt main Vue configuration, this will make the component available to all templates in your app\n```js\nimport Vue from 'vue'\nimport LMovingMarker from 'vue2-leaflet-movingmarker'\n...\nVue.component('l-moving-marker', LMovingMarker)\n```\n\n## Access movingmarker layer directly\n\nIf you need to access other movingmarker methods, like [slideTo()](https://gitlab.com/movingmarker/Leaflet.Marker.SlideTo), you can do it with a ref on the movingmarker vue element and using the `mapObject` property\n\n```html\n...\n\u003cl-moving-marker ref=\"movingMarkerRef\"\u003e\n  ...\n\u003c/l-moving-marker\u003e\n...\n```\n```js\n...\nthis.$refs.movingMarkerRef.mapObject.slideTo()\n...\n```\n\n\n## Develop and build\n\n    npm install\n    npm run build\n\n## Author\n\n[Mazuel Loïc](https://github.com/LouisMazel)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouismazel%2Fvue2-leaflet-movingmarker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouismazel%2Fvue2-leaflet-movingmarker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouismazel%2Fvue2-leaflet-movingmarker/lists"}