Quantcast
Channel: SCN : Unanswered Discussions - SAP for Mobile
Viewing all articles
Browse latest Browse all 5512

SAPUI5 Mobile & Google Map

$
0
0

Using SAPUI5 in Eclipse and showing the google map is proving to be a big challenge. Note that when I created the SAPUI5 project in Eclipse, I selected the "Mobile" framework and not the "Desktop" framework and using Javascript.

 

Below is the snippet of what I have in the index.html:

 

<head>

              <meta http-equiv="X-UA-Compatible" content="IE=edge">

 

                 <script src="resources/sap-ui-core.js"

                      id="sap-ui-bootstrap"

                      data-sap-ui-libs="sap.m"

                      data-sap-ui-theme="sap_bluecrystal" >

              </script>

              <!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->

              <script src="http://maps.google.com/maps/api/js?v=3&sensor=true&region=CA&zoom=13&size=680x680&center=50.4447259142307,-104.60932810886" type="text/javascript"></script>

                 <script>

                     sap.ui.localResources("outagefindersapui5mobile");

                     var app = new sap.m.App({initialPage:"idOutageFinder1"});

                     var page = sap.ui.view({id:"idOutageFinder1", viewName:"outagefindersapui5mobile.OutageFinder", type:sap.ui.core.mvc.ViewType.JS});

                     app.addPage(page);

                     app.placeAt("content");

              </script>

       </head>

 

<body class="sapUiBody" role="application">

              <div id="content"></div>

              <script>

                  outagefinder.outageMap = new google.maps.Map(document.getElementById('content'), {

                    zoom: 7,

                    center: new google.maps.LatLng(50.4447259142307,-104.60932810886),

                    mapTypeId: google.maps.MapTypeId.ROADMAP

                  });

                 

              </script>

       </body>

 

My goal is to show this map upon page load.  I have this working without all the SAPUI5, from a test project so theoretically, this should work per HTML5 standard.  What am I missing?  Thanks.  I dont' have anything in the controller and view file.  This is still just barebone SAPUI5 project.

 

Any help is greatly appreciated.


Viewing all articles
Browse latest Browse all 5512

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>