Search code examples
google-mapsjasper-reportsjasperserver

Increase the infowindow size in Jasper report


I have a Map element in Jasper report in which i am showing some data when clicked over any marker. I am trying to show like 5 rows/lines of data in infowindow. This is the line of code:

<mp:itemProperty name="infowindow.content">
                <valueExpression>
                    <![CDATA["<pstyle='text-align:left;'><a href="+$F{url}+"target=_blank><b>"+$F{markername}+"</b></a><br/>latitude:<b>"+$F{latitude}+"</b><br/>longitude:<b>"+$F{longitude}+"</b></p>"]]>
                </valueExpression>
            </mp:itemProperty>

But, only last 3 lines are being displayed. I want all the lines of data to be displayed. I tried to increase the size of infowindow but failed.

In JavaScript, We can increase the size as,

var infowindow = new google.maps.InfoWindow({
    content: contentString,
    maxWidth: 200
  });

I am not being able to do so in JasperReports. Any sort of help would be highly appreciated.


Solution

  • Ok, I got it working now. It was my mistake that i had messed up with tags and the first line which was <a> tag needed to be removed and by giving a line break at the end. I did that and now it's working fine. This is how it looks. Hope people having same problem get some help.

    enter image description here