Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

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.

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

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!

Labels in this area