Lan-Lord


I'm adding a pushpin, but don't care for the extra height (above and below my text) that the popup/infobox occupies. How can I streamline the amount of space it occupies I am able to control the width,but height I can not.

Here is my create pin logic:

Code Snippet

function CreatePushPin()
{
var Lat = 28;
var Lon = -96;

shape = new VEShape(VEShapeType.Pushpin, [new VELatLong(Lat, Lon)]);

shape.SetCustomIcon("<div><img src='images/icon.gif'></div>");
shape.SetTitle("<div style='height:30px; width:100px;'>small text</div>");

//Add the shape to the map
map.AddShape(shape);

}

Thanks in advance



Re: How can I control the Infobox's height property(s)?

Lan-Lord


Well I came up with a workaround (albeit, not too elegant)

I overide the OnMouseOver event, and placed an alt tag in my custom icon.

The alt hover text is basically all I need, but I'd welcome some more experienced input on tweaking the popup box though.

here are the vitals to making my little hover text work.

Code Snippet

function LoadPage()
{
//loadup the map ...
map.AttachEvent("onmouseover", OnMouseOver);
map.ClearInfoBoxStyles();
CreatePushPin();
}

function OnMouseOver(e)
{
return true;
}

function CreatePushPin()
{
var Lat = 28;
var Lon = -96;

shape = new VEShape(VEShapeType.Pushpin, [new VELatLong(Lat, Lon)]);

shape.SetCustomIcon("<div><img src='images/icon.gif' alt='small text'></div>");
//Add the shape the the map
map.AddShape(shape);
}