Skip to Content

Hii 🙂

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,

Capture.JPG

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

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply