Friday, August 21, 2009

OBIEE Bing Maps

I showed how to integrate Google Maps into OBIEE. Doing the same with Microsoft Bing maps is slightly different. There service is completely asynchronous, which meant a slightly different approach for the narrative view.

Let’s start with the basics. Get your addresses and a extra column for the array counter. This is just a RCOUNT – 1.



Switch to a narrative view. In the prefix part put:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src=""></script>
var map = null;
var count = 0;
var adr = new Array();
var cmt = new Array();
var Center = new VELatLong(52, 6);
var ZoomLevel = 7;
function GetMap()

in the narrative put:

In the postfix part put:

map = new VEMap('myMap'); map.LoadMap();
map.SetCenterAndZoom(Center, ZoomLevel);


function FindLocation(searchstr)
if (searchstr != '')
map.Find(null, searchstr, null, null, null, null, false, null, null, false, AddPin);

function AddPin(layer, resultsArray, places, hasMore, veErrorMessage)

if(places.length > 0)
var shape = new VEShape( VEShapeType.Pushpin,places[0].LatLong);
map.SetCenterAndZoom(Center, ZoomLevel);


</head> <script src="" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready( function(){GetMap();return false;


<body> <div id='myMap' style="position:relative; width:800px; height:600px;"></div> </body>

Don’t forget to set Contains HTML:


Add it to the compound Layout:


I personally find this webservice slower then the one from Google, but maybe some better coding could fix that. If you have any ideas, please let me know.

Till Next Time


OBIEE TALK said...

Very interesting post. Like it

Kwl_PranayJain said...

hi John thanks a lot it was very simple and helpful just 1 more thing i want to know if for example instead of pins let say i want to colour that region... like say any state in USA i want to feed some data in different colours for that paticular region how do i do that..???

John Minkjan said...


have a look at oracle spatials or wait a bit for OBIEE 11G

Anonymous said...

Thanks a lot posting this. However I'm getting 'length' is null or not an object error message on IE8. Any idea?

William T. said...


been reading for a while, first time commenting...this map feature works great. I wondered if there was also a way to build in criteria that once I bring back customer on the map, find other customer within 15 miles, 30 miles, etc?? Thought that would be a helpful addition to this tool for sales team...