Skip to content

Latest commit

 

History

History
109 lines (68 loc) · 3.39 KB

04.md

File metadata and controls

109 lines (68 loc) · 3.39 KB

Overview
Overview
Prerequisites
Prerequisites
Discovery
Discovery
Configuration
Configuration
Development
Development

Configuration

Navigate to https://account.hanatrial.ondemand.com/cockpit#/home/trialhome and log on with your SAP account. In the "Next Steps" section on the page, choose Launch SAP Web IDE:

sap trial home

Choose SAP Cloud Platform Cockpit

sap cloud platform cockpit

From the menu, find the "Destinations" option under "Connectivity" and choose New Destination:

sap new destination

Configure the destination as shown below. Use the "New Property" button to add the two additional fields:

sap map image destination

Save your work. You have created a new destination to allow the HERE Map Image API to be used in an SAPUI5 project.

Create SAPUI5 Project

Return to the SAP Web IDE (likely still open in a previous tab. If not, return to first step of this section). Select the "</>" developer menu option. From the "File" menu option, select "New" then Project from Template:

sap webide new project

Provide project name and namespace. FOr consistancy, use the values provided:

sap project name

Keep the project view types as follows:

sap project type

Finish the new project creation process. You should now have a basic file structure as shown here:

sap empty project

Configure Destination

Open the "neo-app.json" file and add the following node to support the MapImage destination created in previous step:

    {
    "path": "/map",                         
      "target": {
        "type": "destination",
        "name": "MapImage",                
        "entryPath": "/"                    
      },
      "description": "Map Image"
    }

Your new node should be placed in JSON as shown here:

sap new app

Save changes.

Configure APP ID and APP CODE

In your project, expand the "webapp" folder and open the "manifest.json" file. Add the following node to the models section:

    "here": {
        "type": "sap.ui.model.resource.ResourceModel",
        "settings": {
            "bundleName": "demo.SAPUI5_Workshop.here.here"
        }
    }

Your new node should be placed in JSON as shown here:

sap manifest

Save changes.

Create a subfolder under "webapp" named "here" and create a new text file in that folder named "here.properties". Add two lines to this file:

    appId=your_app_id
    appCode=your_app_code 

sap here properties

Optional

In the "webapp" folder, open the "i18n.properties" file and provide values such as:

    title=Demo HERE APIs on SAPUI5
    appTitle=SAPUI5_Workshop
    appDescription=An intro to HERE APIs on SAPUI5

This is just meta data that may be displayed in visual elements of the web application.

Save changes. You are now ready to code!

Proceed to next section