How to: |
You can integrate WebFOCUS reports with Google Maps by:
Latitude and longitude values can be passed as a parameter from a Google Map to update a WebFOCUS procedure. Latitude and longitude are sent as a pair of values, and the HTML Composer uses a specific parameter, &COORDINATES, to parse the value pairs correctly.
By adding a drill down to a Google Map, you can filter a WebFOCUS report by the latitude and longitude coordinates of the selected marker(s). The parameter to pass the longitude/latitude values must be called &COORDINATES. This HTML Composer parameter will parse the Latitude and Longitude as paired data sets.
The following example updates a WebFOCUS report based on a Google Map location by:
The cursor changes into a crosshair.
The Procedure Viewer opens.
Tip: The Century Sales and Locale data sources are available from the Master Files folder in the IBI Demonstration project of Developer Studio. You may copy these source files to the project directory of your choice.
The Open dialog box appears.
The Join dialog box opens.
The File Description List for the Join dialog box opens.
Developer Studio automatically creates a Join between the data sources if they both have fields with the same formats. The Join tool displays both data sources and, the default Joins, as shown in the example image below.
For more information about using the Join tool, see the Creating Reporting Applications With Developer Studio manual.
The Join is added to the Procedure Viewer.
The Open dialog box appears.
The Report Painter opens.
The Report Options dialog box opens at the Where tab.
&COORDINATES is added to the Object Inspector in the Report Variables folder.
The parameters will be passed by the Google Map so you can delete the parameter dialogs here.
The Revenue by Category report appears in the HTML Composer.
The Map Properties dialog box opens at the Map tab.
The following image is an example of the Map Properties dialog box with these drill-down options selected.
Click the markers on the Google Map to update the report based on the location selected, as shown in the image below.
A JavaScript command is used in a WebFOCUS report to update a Google Map. The JavaScript action parent.panToPoint automatically scrolls the Google Map to a specified Latitude and Longitude. In addition, the zoom level of the Google Map can be specified. This will overwrite the zoom level set by default.
Note: If an Active Report is in a dashboard block and uses panToPoint, you should omit parent.
The following example updates a Google Map based on data in a report by:
This JavaScript call requires the following parameters (in the table below) in this order. Each parameter can be set to a Field, Constant Value or a Variable.
Parameters |
Drill Down Parameter Value |
---|---|
LATITUDE |
The latitude value. |
LONGITUDE |
The longitude value. |
Unique Identifier |
The Unique Identifier for the targeted Google Map object. |
Zoom Level |
Numeric value between 0 and 18. |
The cursor changes into a crosshair.
The Procedure Viewer opens.
Tip: The Century Sales and Locale data sources are available from the Master Files folder in the IBI Demonstration project of Developer Studio. You may copy these source files to the project directory of your choice.
The Open dialog box appears.
The Join dialog box opens.
The File Description List for Join dialog box opens.
Developer Studio automatically creates a Join between the data sources if they both have fields with the same formats. The Join tool displays both data sources and the default Joins, as shown in the example image below.
For more information about using the Join tool, see the Creating Reporting Applications With Developer Studio manual.
The Join is added to the Procedure Viewer.
The Open dialog box appears.
The Report Painter opens.
The Report Options dialog box opens at the Style tab.
The StyleSheet Selection box opens.
The selected Style Sheet is added to the Include StyleSheet File section.
The Style Sheet is applied to the report.
The Field Properties dialog box opens at the Style tab.
The Drill Down Parameter dialog box opens.
Note: googlemapcontrol1 is the name of the Google Map object in the HTML Composer.
The following image is an example of the Field Properties Drill Down tab with these options added.
The Field Properties dialog box opens at the Style tab.
The Drill Down Parameter dialog box opens.
Note: googlemapcontrol1 is the name of the Google Map object in the HTML Composer.
The report appears in the HTML Composer.
The Google Map and the report appear in the output. Click a drill-down link from the report. The Google Map updates according to the location selected from the report.
For example, click on a link in the Country column to zoom and navigate to the selected country at the zoom level illustrated. Or click on a link in the State column to zoom and navigate to the selected state at the zoom level specified.
WebFOCUS |