Integrate Google Map with SAPUI5 Application

Google Map in Ui5 application can be used for the logistics purpose of the organization as it provides output for optimized route for any vehicle, optimized distance, optimized travelling time, Traffic updates on the map, Toll Roads, information about the route and many more.

Map services are provided by many vendors which can be implemented in Ui5 applications.This blog explains about the Google Map integration with SapUi5 application.

To integrate Google Maps to sapui5 application, you need google map API. There are several APIs available for Google maps itself, like Google Map android API, Google Maps for IOS, Google maps for Street, Google maps Directions API, similarly many more. The one we are going to use is Google Maps JavaScript API.

To use google API, you will need particular developer API key. Below are the steps on how to create a developer key to use the API in the application.

We have a requirement to integrate our SAP UI5 application with maps and plot our customers on map. Post that we should be able to select a few customers and we should be able to see optimized route on map and other customers close to that route. Would you have some idea if that is possible?

I have to build a map where it shows some addresses with markers and when those markers are clicked, the info window shoes the data corresponding to that address (name, street, etc.). Im using WEB IDE.

I have the same error in the controller.js where it says that google is not define, although when I run the index.html it works fine and the map shows and the markers are created with the info window.

When I run the app in with SAP Fiori Launchpad Sandbox I get erros. There errors are google is not define, and others.

I tried to load the google maps js api in the manifest.json first, then in the controller and it is not working. I tried the following.

I am new to UI5, and having trouble to integrate maps in ui5, could you please tell me in detail how to integrate the map in ui5?, i am using sap wed ide and xml view, any sample example would be great ,