|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +> **⚠️ WARNING ⚠️** <br> |
| 4 | +> This package is **BETA** version. <br> |
| 5 | +> If you find any bugs or missing features please open the issue or create a PR. |
| 6 | +
|
| 7 | +</div> |
| 8 | + |
| 9 | +<h1 align="center"> 📍 vue-leaflet-rotate-marker 📍</h1> |
| 10 | + |
| 11 | +Rotated marker extension for [@vue-leaflet/vue-leaflet](https://github.com/vue-leaflet/vue-leaflet) package. Inspired by [mudin/vue2-leaflet-rotatedmarker](https://github.com/mudin/vue2-leaflet-rotatedmarker). Based on [bbecquet/Leaflet.RotatedMarker](https://github.com/bbecquet/Leaflet.RotatedMarker). |
| 12 | + |
| 13 | +<div align="center"> |
| 14 | + |
| 15 | +[](https://v3.vuejs.org/guide/introduction.html) |
| 16 | + |
| 17 | +[](https://github.com/littleimagine/vue-leaflet-rotate-marker/blob/main/LICENSE) |
| 18 | +[](https://www.npmjs.com/package/vue-leaflet-rotate-marker) |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +</div> |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +<h2 align="center"> DEMO </h2> |
| 29 | + |
| 30 | +_In progress - Coming Soon_ 🔜 |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +<h2 align="center"> ❗Pre Requirements </h2> |
| 35 | + |
| 36 | +- [vue](https://github.com/vue-leaflet/vue-leaflet) | v3.3.4 or higher |
| 37 | +- [leaflet](https://github.com/Leaflet/Leaflet) | v1.9.4 or higher |
| 38 | +- [@vue-leaflet/vue-leaflet](https://github.com/vue-leaflet/vue-leaflet) | v0.10.1 or higher |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +<h2 align="center"> 🚀 Quick Installation </h2> |
| 43 | + |
| 44 | +```sh |
| 45 | +npm i -D vue-leaflet-rotate-marker |
| 46 | +``` |
| 47 | + |
| 48 | +<h2 align="center"> Quickstart </h2> |
| 49 | + |
| 50 | +```js |
| 51 | +<template> |
| 52 | + <div style="height: 600px; width: 100%"> |
| 53 | + <l-map :zoom="5" :center="[-2.5, 118]"> |
| 54 | + <l-tile-layer |
| 55 | + url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" |
| 56 | + layer-type="base" |
| 57 | + name="OpenStreetMap" |
| 58 | + /> |
| 59 | + <l-marker-rotate |
| 60 | + :lat-lng="[-3, 115]" |
| 61 | + rotationOrigin="top center" |
| 62 | + /> |
| 63 | + <l-marker-rotate |
| 64 | + :lat-lng="[-3.5, 117]" |
| 65 | + rotationAngle="100" |
| 66 | + /> |
| 67 | + <l-marker-rotate |
| 68 | + :lat-lng="[-4, 120]" |
| 69 | + rotationOrigin="bottom center" |
| 70 | + rotationAngle="172" |
| 71 | + > |
| 72 | + <l-tooltip> |
| 73 | + Tooltip |
| 74 | + </l-tooltip> |
| 75 | + </l-marker-rotate> |
| 76 | + </l-map> |
| 77 | + </div> |
| 78 | +</template> |
| 79 | + |
| 80 | +<script> |
| 81 | +import { defineComponent } from 'vue'; |
| 82 | +import { LMap, LTileLayer, LTooltip } from '@vue-leaflet/vue-leaflet'; |
| 83 | +import { LMarkerRotate } from 'vue-leaflet-rotate-marker'; |
| 84 | + |
| 85 | +import 'leaflet/dist/leaflet.css'; |
| 86 | + |
| 87 | +export default defineComponent({ |
| 88 | + name: 'SamplePage', |
| 89 | + components: { |
| 90 | + LMap, |
| 91 | + LTileLayer, |
| 92 | + LTooltip, |
| 93 | + LMarkerRotate |
| 94 | + } |
| 95 | +}); |
| 96 | +</script> |
| 97 | +``` |
| 98 | + |
| 99 | +### Support extensions: |
| 100 | + |
| 101 | +This package includes support for the following packages: |
| 102 | + |
| 103 | +- [veitbjarsch/vue-leaflet-markercluster](https://github.com/veitbjarsch/vue-leaflet-markercluster) |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | +<h2 align="center"> 🌱 Contribute </h2> |
| 108 | + |
| 109 | +_- Coming Soon_ 🔜 |
| 110 | + |
| 111 | +### Versioning |
| 112 | + |
| 113 | +[Semantic Versioning Specification (SemVer) 2.0.0](https://semver.org/spec/v2.0.0.html). |
| 114 | + |
| 115 | +--- |
| 116 | + |
| 117 | +<h2 align="center"> 📄 License </h2> |
| 118 | + |
| 119 | +Author: [@bagasnur](https://github.com/bagasnur) |
| 120 | + |
| 121 | +**© 2024** |
| 122 | +Source code & plugin under [MIT license](https://github.com/littleimagine/vue-leaflet-rotate-marker/blob/main/LICENSE). |
0 commit comments