JediJuice / geo-location-javascript

Automatically exported from code.google.com/p/geo-location-javascript
0 stars 0 forks source link

position object is coming as null #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Please refer below

What is the expected output? What do you see instead?
Position object is coming null,so latitude and longitude are not coming.

What version of the product are you using? On what operating system?
Version: geo-location-javascript_0_4_08 and Windows operating system 7.

I have implemented the code like below in the sample jsp.I am not using any 
navigator.getcurrentLocation and all.
I am getting the "p" object as null,as a result longitude and latitude are 
coming null.Please refer to the code below specially the "alert".

Request you to please look into this ASAP and reply

<page>  
<script src="/xyz/geo-min.js" type="text/javascript" charset="utf-8"></script>
<script src="/xyz/geo_position_js_simulator.js" type="text/javascript" 
charset="utf-8"></script>
<script src="/xyz/geo.js" type="text/javascript" charset="utf-8"></script>

<script>
    if(geo_position_js.init()){
        geo_position_js.getCurrentPosition(success_callback,error_callback,{enableHighAccuracy:true});

    }
    else{
        alert("Functionality not available");
    }

    function success_callback(p){
    alert("position::::"+p);
    alert('lat='+p.coords.latitude.toFixed(2)+';lon='+p.coords.longitude.toFixed(2));   

    }

    function error_callback(p)
    {
        alert('error='+p.message);
    }       
    </script>

</page>

Original issue reported on code.google.com by javeed.n...@gmail.com on 30 Jul 2013 at 11:06