Question

I am using Bing maps to display markers on the map.

I am able to display an infobox on the over of this markers. Now my infobox contains a summary which is display somewhat like this

var pinInfoboxOptions = { 
     width: 300,
     height: sumxi,
     description: summ,
     visible:true
};

Now i am able to display the inbox where the description has the full information about the marker. If i am to add a link by using the infoboxoptions actions then the infobox does not get displayed. please Help

var pinInfoboxOptions = { 
    width: 300,
    height: sumxi,
    description: summ,
    actions:[{label:'test1',eventHandler: testEvent1}],
    visible:true
};
Was it helpful?

Solution

If you want a link then you need to use the infobox option htmlContent, this is the example from the SDK docs:

var infoboxOptions = {width :200, 
height :100, showCloseButton: true, 
zIndex: 0, offset:new 
Microsoft.Maps.Point(10,0), 
showPointer: true, 
htmlContent:'Custom HTML'};

Based on the q's edit, the title click handler will probably do the job: Again from the doc:

'titleClickHandler string' The name of the function to call when the title of the info box is clicked. If this property is set, the title of the info box is displayed as a link.'

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top