Enabling a Map on a Maintenance Portal

Availability of the latitude and longitude is imperative for displaying the location on the map.

Map-enabled entities are those in which the data includes the latitude/longitude directly or in which the data can be derived using other information captured on the Business Object.

To enable a map on a maintenance portal:

  1. Derive geographic map information by creating a service script that retrieves one or more locations associated with the object.

    The common schema for geo map derivation service scripts is:

    <schema> 
        <includeDA name="C1-GeoMapInfo"/> 
    </schema>
    

    For each location retrieve:

    • Latitude and Longitude.
    • Tooltip text is the text that is shown in the callout when the user hovers over the pointer image.
    • Additional information contents and title is the information displayed in the popup when user clicks on the pointer image and the title for this popup. The information can be returned as plain text or HTML.
    • Pointer Image Location is the alternative image for the pointer image. Populate it if your implementation wishes to override the default graphic, or when a certain location(s) is associated with a special image.

    There is also an option to override the displayed map completely. The output of the script may include an alternative map window style, map theme, map layer, default initial zoom and even point to an alternative Oracle MapViewer installation.

  2. Define a business object option by adding a new option, Geo Map Derivation Script, to the business object. Specify the service script created above.
  3. Add a portal zone by adding an Explicit Map Zone to the maintenance portal.
    • Display Object. Specify ss='C1-GeoMapDer'. This common service script derives object-specific Geo Map Derivation script and invokes it to retrieve the map data.
    • UI Map. Specify map='C1-GeoMap'. This map is designed to display a set of geo locations derived by a Geo Map Derivation script.
    • Zone Visibility Service Script. The base product includes visibility script that evaluates an object by maintenance object+primary keys combination, invokes Geo Map Derivation script and returns true if there is at leat one location to display. An example of this parameter configuration for Asset:
      ss='C1-GMShwZn'
      input=[mo='C1-ASSET' pkval1=ASSET_ID]
      output=shouldShowZone
      
    • XML Parameters 1-15. Use these parameters to pass maintenance object and primary keys for the entity in context to the service script. An example of XML Parameters 1 and 2 for Asset:

      XML Parameter 1:

      name=ASSET_ID
      targetPath=input/pkValue1
      poprule=R
      

      XML Parameter 2:

      name=MAINT_OBJ_CD
      targetPath=input/mo
      spec='C1-ASSET'
      

    Refer to Zone C1-ASSETMAP as an example.

  4. Configure the main query/search zone. The Map column with the View link does not appear on the search result automatically, so the zone configuration must be amended as follows:
    • Add logic to check for the existence of the geo location information (e.g., for the existence of at least one address linked to an asset whose latitude and longitude are populated. Return the existence indicator as an SQL column.
    • Make sure the SQL results include the entity identifiers Maintenance Object and Primary Keys.
    • Configure an explorer column to invoke the BPA script C1-GeoMapOP, passing entity information (Maintenance Object and Primary Keys) as an input. The script determines the business objects, invokes the geo map derivation script, and opens a UI map with the data returned by the script.

      An example of the column configuration for the Asset Search:

      source=SQLCOL
      sqlcol=LABEL_LONG
      label=ADDRESS_MAP_LBL
      bpa='C1-GeoMapOP'
      tempstorage=[mo='C1-ASSET' pkValue1=ASSET_ID]
      

    Refer to zone C1-ASSETQ1 as an example.