2017-07-16 6 views
0

こんにちは、GoogleMaps ApiをTizen App for Gear S3に統合する方法のコードを探しています。Tizen on Gear S3は、Webアプリケーション内でGoogleMaps Apiを呼び出すことが可能です

Tizen Studioのエミュレータでは動作しますが、ギア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"/> 

次のステップは、アクセスポリシーを使用してインターネット接続の権限をチェックすることです、ここでこの応答をチェックしてみて下さい:

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アプリケーションのoogleマップ。 https://developer.tizen.org/community/tip-tech/google-maps-on-tizen

関連する問題