I want to access the geolocation feature from the webshim library but i have failed to figure out the right setup to get it working ?
I am already accessing the inbuilt browser geolocation
feature, but want to setup the polyfill in the case of browsers that dont have the geolocation
feature.
import React from "react";
import webshim from 'webshim';
import $ from 'jquery';
class PlayGround extends React.Component{
pickLocation = () => {
console.log("Inside here")
webshim.ready('geolocation', () => {
navigator.geolocation.getCurrentPosition(function(pos){
alert("Thx, you are @ latitude: "+ pos.coords.latitude +"/longitude: " + pos.coords.longitude);
});
});
console.log("end inside")
}
}