OBIEE 10G - Integration of a Static Map with Mapviewer

> Reporting and Data Access Tools > Oracle Business Intelligence (OBIEE/Siebel Analytics) > OBIEE - BI Presentation Service (SAW/OBIPS)

1 - About

This article talk about a static integration of a map created with Mapviewer for OBIEE 10G. 11G has already this integration done for you.

In this article, the NSDP library (non spatial data provider) is used and show you how Mapviewer can use it to integrate data from other application particularly in Dashboard / Answers.

The creation of the integrated map is detailed in this article : Mapviewer - SH Customer Density Semi-Static Map and therefore you have to perform its steps first.

By a “static integration”, I mean that no data from OBIEE are used by Mapviewer to render the style of the map. If you want a example of a dynamic integration, see this article OBIEE 10G - Integration of a heat-map with Mapviewer

3 - Prerequisites

The creation of the integrated map is detailed in this article : Mapviewer - SH Customer Density Semi-Static Map and therefore you have to perform its steps first.

4 - How to

To render a map with Oracle Mapviewer, the most common technique is to used Oracle Map, the javascript library of Oracle MapViewer.

In an answer, in a dashboard :

  • add a static text view
  • check the box “Contains HTML Markup”.
  • and add the javascript below
<script language="Javascript" src="http://mapviewerhost:9704/mapviewer/fsmc/jslib/oraclemaps.js"></script>
 
<script language=javascript>
  function showMap()
  {	
    var baseURL  = "http://"+document.location.host+"/mapviewer";
    var mapCenterLon =  -96.554346;
    var mapCenterLat =  38.987208;
    var mapZoom      =  0;
    var mpoint = MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,8307);
    var mapview = new MVMapView(document.getElementById("map"), baseURL);
    mapview.addMapTileLayer(new MVMapTileLayer("mvdemo.SH_CUST_DENSITY_MAP")); 
    mapview.setCenter(mpoint); 
    mapview.setZoomLevel(mapZoom);    
    mapview.display();  			
  }
 
  function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}
 
addLoadEvent(showMap);
 
</script>
<div id="map" style="width:600px; height:300px"></div>

Giving the complete path to the oraclemaps.js script is really important

Advertising

5 - The result