Quantcast
Channel: SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 789

SAPUI5 with Google API's

$
0
0

From last few weeks, I am continously engaged in learning SAPUI5 and I must say, I am compeltely in love with it!!

 

In this blog, we will see how to use any Google API with SAPUI5. There are many public API's available which can be consumed and that way we can save our time and effort in building complex UI's.

 

All you have to do is to add the following line in your <head> element of your index.html file.

 

<script type="text/javascript" src="https://www.google.com/jsapi"></script>

 

 

The src element points to a javascript file, which has a single method

 

google.load

 

 

 

Using this method you can load any individual Google API's.

 

Here's the list of Google API's packages which could be used with the above method. Each package will have its own sets of methods, which can be used to load/draw the contents.

 

As an example, we will use the core chart package.

 

Add the follwoing lines in the index.html file.

 

1.PNG

 

 

We have created a simple javascript file which will draw a core chart and placed it in the <div> of our index.html.

 

Output would be like

 

2.PNG

Let's play around with these kind of stuff and get more complex API's to work.

 

I have modified this blog to get the values dynamically. Please visit Dynamic SAPUI5 with Google API's

 

Cheers!


Viewing all articles
Browse latest Browse all 789

Trending Articles



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