Hi All,
Hopefully an easy one. Using the leaflet map option from the HTML report generator. Is there a simple way to position the maps centrally instead of width 100%?
Thanks
Hi All,
Hopefully an easy one. Using the leaflet map option from the HTML report generator. Is there a simple way to position the maps centrally instead of width 100%?
Thanks
Best answer by gerhardatsafe
Hi @lemzip,
The HTMLReportGenerator adds an HTML style attribute to the div container of the map. You can easily modify this attribute by replacing it with a StringReplacer. The default HTML attribute looks like this:
style="width:100%;height:500px;"
If you add a StringReplacer searching for this string in the html_content attribute and replace it with, for example, this:
style="position:fixed;
top: 50%;
left: 50%;
width:30em;
height:18em;
margin-top: -9em;
margin-left: -15em;"
you will end up with a map in the center of the window. This is an easy way to change the style of the default map output of the HTMLReportGenerator.
I hope this helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.