Tizen IVI GPS

Tizen IVI GPS

BY 19 Oct 2015 Web Application Development

Hello I am using Tizen IVI web simulator to test my application who is supposed to watch longitude and latitude.

To do it i am using this code

var map;


function successCallback(position)
 {
    document.getElementById(“locationInfo”).innerHTML = “Latitude: ” +   
    position.coords.latitude + “<br>Longitude: ” + position.coords.longitude;
    var mapProp = {
            center:new google.maps.LatLng(position.coords.latitude,position.coords.longitude),
            zoom:17,
            mapTypeId:google.maps.MapTypeId.ROADMAP
          };
          map=new google.maps.Map(document.getElementById(“googleMap”),mapProp);

    
 }

 function errorCallback(error)
 {
    var errorInfo = document.getElementById(“locationInfo”);

    switch (error.code)
    {
       case error.PERMISSION_DENIED:         
          errorInfo.innerHTML = “User denied the request for Geolocation.”;
          break;
       case error.POSITION_UNAVAILABLE:
          errorInfo.innerHTML = “Location information is unavailable.”;
          break;
       case error.TIMEOUT:
          errorInfo.innerHTML = “The request to get user location timed out.”;
          break;
       case error.UNKNOWN_ERROR:
          errorInfo.innerHTML = “An unknown error occurred.”;
          break;
    }
 }
 function watchFunc()
 {
    if (navigator.geolocation)
    {
       watchId = navigator.geolocation.watchPosition(successCallback, errorCallback);
    }
    else
    {
       document.getElementById(“locationInfo”).innerHTML = “Geolocation is not supported.”;
    }
 }

 

when i run it on web simulator map is shown and everything is alright but when i change location in geolocation settings of the WebSimulator nothing happens so please help me to know where exactly i messed up.


PS: i tried using markers and playback (in geolocation section of the websimulator but nothing is going on.

Thanks for your help 🙂

Written by