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_member182048
Active Contributor

There are a number of map providers available to use with UI5, none of them seemed to me to be as simple to use as Google Maps, so I wrote a library.

Getting Started

Goto OpenUI5 Googlemaps Library Github page, download and install the library


Include the library



sap.ui.getCore().loadLibrary("openui5.googlemaps", "../openui5/googlemaps/");


Add a openui5.googlemaps control to your page


<?xml version="1.0" encoding="UTF-8" ?>
<mvc:View xmlns:mvc="sap.ui.core.mvc"
    xmlns:gmaps="openui5.googlemaps"
    controllerName="sampleController">
    <gmaps:Map height="250px" zoom="12" lat="-33.895" lng="151.275">
        <gmaps:markers>
            <gmaps:Marker lat="-33.895" lng="151.275" info="Bondi Beach" />
        </gmaps:markers>
    </gmaps:Map>
</mvc:View>


Its as simple as that.

The openui5.googlemaps library supports Maps, Markers, Polylines and Polygons.

It also has Location detection and the ability to add an API key.

Along with the library there are also a number of sample applications to help get you started.

The library if FOSS, contributions welcome, any issues please report through sapui5  - Stack Overflow

Enjoy

75 Comments
Labels in this area