语言

Menu
Sites
Language
Tizen IVI GPS

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 :)

响应

6 回复
daniel kim

Hi,

I would suggest you to post your query to mailing list of tizen web simulator.

  https://lists.01.org/mailman/listinfo/web-simulator

Regards

Palitsyna

Hello,

You can also get some more information in here, https://developer.tizen.org/tizen/ivi/support-community
Here about Support & Community for IVI.

Vikram

Hi,

It seems the source code logic and function is right. But the problem occured when you change data in simulator.

You can ask your query in https://lists.tizen.org/listinfo/ivi, it about some specifical question for IVI.

AVSukhov

Hello,

Also, you can try to ask your question in following way:

https://wiki.tizen.org/wiki/Tizen_IVI_SDK#FAQ

Ahmed BHK

Thanks guys for your help but it seems to be a simulation problem :)

Vikram

Hi,

I try to run project by simulator by web application by using Tizen 2.3.1 sdk. When I changed the comtents under "Geolocation" for "Latitude" and "Longitude".

The corresponding map location will be displayed