Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Hii :smile:

This is a simple custom control that creates a Google Map and sets the location based on the address provided ! The control can be instantiated in a simpler way just like this,


var oMap = new ref.google.Map({ address:"Bangalore" });


This will produce,

The Address just doesn't have to be a city, it can be any valid address.

Don't forget to check out this snippet, http://jsbin.com/zetel/1/edit where i have done some sample implementations with various address by creating a JSON Model.

The custom control code is avail - https://gist.github.com/ikiw/775a2a438571ba4e00d3

This control requires Google maps library which can be loaded next to the sapui5 bootstrap script


<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

Let me know if you've got something to collaborate/enhance this.

Regards

Sakthivel

1 Comment