How to get location in android using javascript
<p>I want to get location on android. Following is the code:</p>

<pre><code>navigator.geolocation.getCurrentPosition(
            function(position) {
                document.getElementById('longitude').value  = position.coords.longitude;
                document.getElementById('latitude').value   = position.coords.latitude;
                document.nearby_property_search.submit();
            },
            function errorCallback(error) {
                alert('Your location sharing setting is currently turned off');
            },
            {
                maximumAge:Infinity,
                timeout:10000,
                enableHighAccuracy: true
            }
        );
</code></pre>

<p>I have checked Wireless and GPS settings as well. While GPS is enabled and browser's 'Enabled Location' option is checked then also it is showing as error as 'Your location sharing setting is currently turned off'.</p>

<p>Is there any other settings for Android?</p>
