In my previous post on Geospatial Analytics in OBIEE, I had talked about shapefiles, and how shapefiles could be imported using Map Builder. As mentioned earlier, the shapefiles contain the positional/geographic information. Once we have loaded this geographic information in to the spatial database, we need a map/spatial engine to process this information for use in tools like Oracle BI. This is what Oracle Mapviewer is for.
Oracle Mapviewer is a J2EE application which acts as a spatial/map engine to render maps based on the geodetic information available in the spatial tables. It can integrate with a variety of applications. When it comes to OBIEE, Mapviewer comes deployed in WebLogic (we don't need to download or install anything for Mapviewer). The focus of this post will be to examine how we can configure Mapviewer, including setting up connectivity to the spatial database and also to create base maps or background maps.
Mapviewer can be accessed through the browser, the URL being http://<hostname>:9704/mapviewer.
The first step in configuring Mapviewer is setting up the connectivity to the spatial database. This is needed mainly for two things:
To create a data source (connectivity) to the spatial database, there are two ways:
Currently, there is a bug in Mapviewer related to the second option, due to which, upon restarting the Mapviewer service after creating a datasource in the Datasources section, the datasource is wiped off. So the recommendation for the time being is to create the datasources in the config file itself.
To create a datasource:
<map_data_source name="<datasource name that you wish to give>"
jdbc_host="<hostname or host IP>"
jdbc_sid="<SID>"
jdbc_port="<port>"
jdbc_user="<schema username>"
jdbc_password="!<schema password>"
jdbc_mode="thin"
number_of_mappers="3"
allow_jdbc_theme_based_foi="false"
/>
Take note that for the value for jdbc_password, there is a '!' symbol preceeding the schema password. This is to enable mapviewer to encrypt the password upon restarting the mapviewer service.
Also ensure that the above piece of code is uncommented, and that the closing tag is in place (some of the things which usually can prevent a successful restart or restart without any change)
3. After the above steps, restart Mapviewer service by clicking on 'Save and Restart' at the bottom of the page
After completing the above steps, click on 'Datasources' link on the left hand panel. This will take you the Datasources section, where you will see the data source that you had defined earlier in the configuration section. This completes configuration of the datasource.
The next step is to create a background map. Background maps are referred to as Tile Layers in Mapviewer.
4. Click on 'Submit' once done. You will be redirected to the 'Manage Tile Layers' which lists out all the map tile layers which have been created.
This concludes the setting up/configuration of Mapviewer.
In my next blog, which would be the final part to the 'Geospatial Analytics in OBIEE' series, I will talk about how we could put to use all these (layers, background maps, etc.) in OBIEE and create map based visualizations.
Until then, happy learning!
Related Blogs
Geospatial Analytics in OBIEE Basics
Shapefiles and map builder