{"id":16261218,"url":"https://github.com/patrickcate/vue-leaflet-minimap","last_synced_at":"2025-03-19T22:30:48.007Z","repository":{"id":37665764,"uuid":"265138088","full_name":"patrickcate/vue-leaflet-minimap","owner":"patrickcate","description":"A Vue2Leaflet wrapper for the Leaflet-MiniMap control plugin.","archived":false,"fork":false,"pushed_at":"2025-03-03T15:58:45.000Z","size":1313,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T08:18:37.029Z","etag":null,"topics":["leaflet","leaflet-minimap","vue","vue2leaflet"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/patrickcate.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-19T03:54:21.000Z","updated_at":"2025-01-26T15:46:42.000Z","dependencies_parsed_at":"2023-02-13T00:16:09.322Z","dependency_job_id":"62be30a2-7edd-410d-9bc5-2c4ee1d27b76","html_url":"https://github.com/patrickcate/vue-leaflet-minimap","commit_stats":{"total_commits":167,"total_committers":3,"mean_commits":"55.666666666666664","dds":"0.12574850299401197","last_synced_commit":"ae1ff22fec729ffa51177147be26b3b7b1773bd0"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcate%2Fvue-leaflet-minimap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcate%2Fvue-leaflet-minimap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcate%2Fvue-leaflet-minimap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickcate%2Fvue-leaflet-minimap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickcate","download_url":"https://codeload.github.com/patrickcate/vue-leaflet-minimap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244025188,"owners_count":20385530,"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":["leaflet","leaflet-minimap","vue","vue2leaflet"],"created_at":"2024-10-10T16:40:49.863Z","updated_at":"2025-03-19T22:30:47.631Z","avatar_url":"https://github.com/patrickcate.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-leaflet-minimap\n\nA [Vue2Leaflet](https://github.com/vue-leaflet/Vue2Leaflet) wrapper component for the [Leaflet-MiniMap](https://github.com/Norkart/Leaflet-MiniMap) plugin.\n\n## Dependencies\n\n- [Vue.js](https://github.com/vuejs/vue)\n- [Vue2Leaflet](https://github.com/vue-leaflet/Vue2Leaflet)\n- [Leaflet.js](https://leafletjs.com/)\n- [Leaflet-MiniMap](https://github.com/Norkart/Leaflet-MiniMap)\n\n## Installation\n\n```bash\nnpm install leaflet-minimap vue-leaflet-minimap\n```\n\nor\n\n```bash\nyarn add leaflet-minimap vue-leaflet-minimap\n```\n\nYou can add the plugin by either adding it as a `\u003cscript\u003e` tag or importing it into a SFC.\n\n## Usage\n\nYou will need to create a Leaflet TileLayer to pass to the minimap component. The [plugin authors recommend either making a copy of an existing base layer or using a different one](https://github.com/Norkart/Leaflet-MiniMap#using-the-minimap-control). Custom options can also be passed.\n\n**Example:**\n\n```js\n\u003cscript\u003e\nimport L from 'leaflet'\nimport { LMap, LTileLayer } from 'vue2-leaflet'\nimport VueLeafletMinimap from 'vue-leaflet-minimap'\n\nexport default {\n  components: { LMap, LTileLayer, VueLeafletMinimap },\n  data() {\n    return {\n      zoom: 5,\n      center: [47.41322, -1.219482],\n      url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n      attribution: 'Map data \u0026copy; OpenStreetMap contributors',\n      layer: new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'),\n      options: {\n        position: 'bottomleft',\n        width: 200,\n        height: 175,\n      },\n    }\n  },\n}\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cl-map :zoom=\"zoom\" :center=\"center\"\u003e\n    \u003cl-tile-layer :url=\"url\" :attribution=\"attribution\"\u003e\u003c/l-tile-layer\u003e\n    \u003cvue-leaflet-minimap\n      :layer=\"layer\"\n      :options=\"options\"\n    \u003e\u003c/vue-leaflet-minimap\u003e\n  \u003c/l-map\u003e\n\u003c/template\u003e\n```\n\n### Styling\n\nThis plugin does not include the default Minimap CSS. To include it you will need to add it as a `link rel=\"stylesheet\"` tag in the head, or import it in the `\u003cstyle\u003e` section of a component.\n\n```js\n\u003cstyle\u003e@import '~leaflet-minimap/dist/Control.MiniMap.min.css';\u003c/style\u003e\n```\n\n### Props\n\n| Name | Type | Required | Description |\n| --- | --- | --- | --- |\n| `layer` | `Object` | Yes | A Leaflet TileLayer. |\n| `options` | `Object` | No | Options to pass to the plugin. See [Leaflet-MiniMap](https://github.com/Norkart/Leaflet-MiniMap) for a full list. |\n\n### Events\n\n| Name | Description |\n| --- | --- |\n| `ready` | Fired when plugin has been mounted. |\n| `minimize` | Fired when minimap is minimized. Only works when the `toggleDisplay` option is set to `true`. |\n| `restore` | Fired when minimap is expanded. Only works when the `toggleDisplay` option is set to `true`. |\n| `toggle` | Fired both when minimap is minimized or expanded. Only works when the `toggleDisplay` option is set to `true`. |\n\n### Methods\n\n| Name | Arguments | Description |\n| --- | --- | --- |\n| `changeLayer` | `TileLayer` | Swaps out the minimap layer with the one provided. |\n\n## Development\n\n### Project setup\n\n```bash\nyarn install\n```\n\n### Compiles and hot-reloads for development\n\n```bash\nyarn serve\n```\n\n### Compiles and minifies for production\n\n```bash\nyarn build\n```\n\n### Lints and fixes files\n\n```bash\nyarn lint\n```\n\n### Author\n\n[Patrick Cate](https://github.com/patrickcate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickcate%2Fvue-leaflet-minimap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickcate%2Fvue-leaflet-minimap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickcate%2Fvue-leaflet-minimap/lists"}