Entering content frame

Procedure documentation Extend the Layout of the GeoServiceView Locate the document in its SAP Library structure

 

In the View Designer of the Web Dynpro tools, the GeoServiceView looks as follows:

This graphic is explained in the accompanying text

You now extend the view with the GeoMap UI element and bind the data of the corresponding UI element properties.

Procedure

1. Create the UI Element GeoMap in the GeoServiceView:

Extend the layout of the view with the following UI elements or properties:

 

Property

Value

Map GeoMap of type GeoMap

This graphic is explained in the accompanying text The attributes

-          bottom (bottom latitude)

-          top (top latitude)

-          right (right border: longitude)

-          left (left border: longitude)

define the world map sector to be visualized. In this example, it is the sector Germany:

 

Bottom

47.3

Top

55

Right

14.5

Left

5.2

igsUrl

This graphic is explained in the accompanying text The igsUrl depends on the used IGS server

<URL on IGS with GeoServices>

height

400

width

500

This graphic is explained in the accompanying text The GeoMap allows you to move the map sector and to zoom in; to do this, you must make the following settings in the properties:

 

moveType

Panel

zoomType

Panel

 

geoObjectSource

This graphic is explained in the accompanying text All geo objects stored in this context are displayed on the GeoMap.

This graphic is explained in the accompanying text GeoData.geoObject

2. Create Action ShowRoute

In the action handler of action ShowRoute, you implement the steps required for calculating the route.

...

       1.      Define this action in the controller of the GeoServiceView under the Actions tab page.

Name of the Action

Without Validation

Event Handler

ShowRoute

unchecked

onActionShowRoute

       2.      Switch to the Layout tab page and bind the onAction event of UI element Button_ShowRoute to the previously defined action.

UI Element Name

Event Name

Action

Button_ShowRoute

onAction

ShowRoute

 

3. Display the Route Information

Im Oberflächenelement Container_Information finden Sie die TextViews Duration und Distance.After the route calculation, these fields shall display the duration and distance of the journey.

This graphic is explained in the accompanying text

...

       1.      Bind the context attributes Duration and Distance to the appropriate TextView:

Property

Value

TextView - Duration

Text

This graphic is explained in the accompanying text RouteInformation.Duration

TextView - Distance

text

This graphic is explained in the accompanying text RouteInformation.Distance

Result

You have added a map, created action ShowRoute, and bound it to the pushbutton. In addition, you have bound the context attributes for the route information to the TextView UI elements.

This graphic is explained in the accompanying textNext step:

Implement the Action Handler onActionShowRoute

  

  

 

Leaving content frame