ghettovoice / vuelayers

Web map Vue components with the power of OpenLayers
https://vuelayers.github.io/
MIT License
680 stars 227 forks source link

How to record a route for phone navigation #349

Closed dohren closed 4 years ago

dohren commented 4 years ago

Hi Ghettovoice,

thank you for your project of vuelayers. I want to track a route, so I need a vector with a feature. The track was never updated , when I used

<vl-source-vector :features.sync="track" />

So this is my solution:

    <vl-layer-vector>
          <vl-feature>
            <vl-geom-line-string :coordinates="this.tracking"></vl-geom-line-string>
          </vl-feature>
          <vl-style-box>
            <vl-style-fill color="rgba(255, 255, 255, 0.2)"></vl-style-fill>
            <vl-style-stroke color="green" :width="3"></vl-style-stroke>
          </vl-style-box>
      </vl-layer-vector>

So thank you for your project.