2017-07-16 39 views
0

你好,我正在尋找關於如何將GoogleMaps Api集成到齒輪S3的Tizen應用程序的代碼,它實際上可能還是隻是本機應用程序?齒輪S3上的Tizen可以在Web應用程序中調用GoogleMaps Api

在Tizen Studio中的模擬器上工作,但在Gear S3上它只顯示測試。

到目前爲止,我測試此代碼剪斷:

<!DOCTYPE html> 
<html> 
<head> 
<meta name="viewport" content="width=device-width,user-scalable=no"> 
<title>Circular UI</title> 
<link rel="stylesheet" href="lib/tau/wearable/theme/default/tau.min.css"> 
<link rel="stylesheet" media="all and (-tizen-geometric-shape: circle)" 
    href="lib/tau/wearable/theme/default/tau.circle.min.css"> 
<!-- load theme file for your application --> 
<link rel="stylesheet" href="css/style.css"> 
</head> 
<body> 
    <div class="ui-page ui-page-active" id="main"> 


     <div id="map">test</div> 


    </div> 
    <script type="text/javascript" src="lib/tau/wearable/js/tau.min.js"></script> 
    <script> 
     var map; 
     function initMap() { 
     map = new google.maps.Map(document.getElementById('map'), { 
      center: {lat: -34.397, lng: 150.644}, 
      zoom: 8 
     }); 
     } 
    </script> 
    <script 
     src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDdKjhStoKF6t0xxA_hFxYBmKrEb77b-nQ&callback=initMap" 
     async defer></script> 

</body> 
</html> 

回答

1

的所有第一,確保Tizen Web應用程序在「位置」特權獲取設備的位置也與「config.xml中」文件功能。

<feature name="http://tizen.org/feature/location.gps"/> 
<tizen:privilege name="http://tizen.org/privilege/location"/> 

下一步將檢查與訪問策略的Internet連接權限,請看看這裏這個應答:

Not able to connect proxy in Tizen emulator

我建議你遵循Tizen開發者論壇這個帖子:

https://developer.tizen.org/forums/web-application-development/how-use-google-maps-on-gear-s2?langswitch=en&langredirect=1

此外,本指南會談精心關於自定義g Tizen Web應用程序中的Google地圖。 https://developer.tizen.org/community/tip-tech/google-maps-on-tizen

相關問題