title: get Geo Coordinate in vue js
body: <p>I want client current geolocation, for accuracy, i put 10000 timeout</p>
  
  <pre><code> var options = {
        timeout: 10000
      };
  </code></pre>
  
  <p>This is js function</p>
  
  <pre><code>function getCoordinates() {
    return new Promise(function(resolve, reject) {
      if (
        !("geolocation" in navigator) ||
        !("getCurrentPosition" in navigator.geolocation)
      ) {
        return Promise.reject(new Error("geolocation API not available"));
      }
      var options = {
        timeout: 10000
      };
  
      // browser prompts for permission
      navigator.geolocation.getCurrentPosition(
        getPositionCallBack,
        reject,
        options
      );
  
      function getPositionCallBack(position) {
        var coords = "";
        try {
          coords = {
            lat: position.coords.latitude,
            long: position.coords.longitude
          };
        } catch (err) {
          return reject(err);
        }
        return resolve(coords);
      }
    });
  }
  </code></pre>
  
  <p>Store:</p>
  
  <pre><code>var Ui = new WebUi({
  coordincates:'',//initialise
  });
  
  export default {
    name: "app",
    store: Ui.store,
    components: { Page },
    data() {
      return {
        favIcon: getFavIcon()
      };
    }
  };
  </code></pre>
  
  <p>updates WebUi coordinate after Promise completed.</p>
  
  <p>I am updating store again after get coordinate then getting following error in vue js.</p>
  
  <pre><code>Do not mutate vuex store state outside mutation handlers.
  </code></pre>
  
  <p>I did modified store/index.js
  updates</p>
  
  <pre><code>strict: false,
  </code></pre>
  
  <p><strong>now issue is how do i update my coordinate of store from javascript.</strong></p>