0

Hello I am searching for code on how to integrate GoogleMaps Api in an Tizen App for Gear S3, is it actually possible or just as Native App?

On the emulator in Tizen Studio it works, but on the Gear S3 it's only displaying test.

So far I tested this code snipped:

<!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>
Tim Schwalbe
  • 1,588
  • 4
  • 19
  • 37

1 Answers1

2

First of All, Make sure the Tizen Web application have the "Location" privilege to get device location also with the feature in 'config.xml' file.

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

Next Step would be to check the Internet connectivity privilege with access policy, Please check out this response here:

Not able to connect proxy in Tizen emulator

I would recommend you to follow this post on Tizen Developers Forum:

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

In addition, This Guide talks elaborately about Using Google Maps in Tizen web applications. https://developer.tizen.org/community/tip-tech/google-maps-on-tizen

Md. Armaan-Ul-Islam
  • 2,154
  • 2
  • 16
  • 20