Friday, July 22, 2011

Virtual Earth

When I was integrating Virtual Earth 3D in a GPS location software
I noticed that the default InfoBox for a push pin added on the map has a fixed size. When looking at Microroft documentation they said that the style can be overriden by calling map.ClearInfoBoxStyles().

http://msdn.microsoft.com/en-us/library/bb412441.aspx#Y792

Well this is working for 2D map but for 3D the info box is blanked.

The Virtual Earth CSS is poorly documented but I found a way to override the style sheet without calling ClearInfoBoxStyles and then be able to view bigger infobox.
Include the following at the top of your hosting page

/* override VE css to resize infoboxes */

.ero .ero-body
{
width:550px!important;
overflow: auto;
}

.ero .firstChild
{
width:540px!important;
}

No comments: