[Qgis-user] How to make HTML map tip size larger in QGIS 3.32

Yoann QUENACH DE QUIVILLIC yquenach at itlink.fr
Mon Oct 9 02:26:40 PDT 2023


FYI, this is the MapTip template used in QGIS 3.32

<html>
   <head>
     <style>
     body {
         margin: 0;
         font: %1pt \"%2\";
         color: %3;
         width: %4px;
     }
     #QgsWebViewContainer {
         background-color: %5;
         border: 1px solid %6;
         display: inline-block;
         margin: 0
     }
     #QgsWebViewContainerInner {
         margin: 5px
     }
     </style>
   </head>
   <body>
     <div id='QgsWebViewContainer'>
       <div id='QgsWebViewContainerInner'>
       %7
       </div>
     </div>
   </body>
</html>

The HTML code typed by the user is actually inserted in place of the '%7'
placeholder.
Note that in 3.32 the maptip WebView is at most (canvas_width/2) *
(canvas_height/2).
This will change in 3.34 where it will take the space available in the
largest quadrant around the cursor.

Le dim. 13 août 2023 à 08:47, Adam Nielsen via QGIS-User <
qgis-user at lists.osgeo.org> a écrit :

> Hi all,
>
> Since upgrading to QGIS 3.32 the map tips are now working for me.
> However the HTML formatting seems to have changed.  I can adjust the
> HTML to mostly work around it, however the one thing I can't figure out
> how to do is to change the frame size so the popup itself appears
> larger on the screen.
>
> Previously I was putting a photo in the map tip with <img width="1024">
> and it would open up in a map tip 1024 pixels wide, so I could clearly
> see the whole photo.
>
> Now, in QGIS 3.32, the map tip seems to be limited to a postage-stamp
> sized box with scroll bars, so the image is the same size as before,
> but now I have to scroll around and I can only see a tiny bit of the
> photo at any one time.
>
> I have tried using <style> tags and setting the 'body' element to have
> a different width but this did nothing, and adding <html> and <body>
> tags didn't do anything either.  My <div> tags seem to have become
> inline instead of "display: block" like they were previously so
> something seems to have happened with the styling.
>
> I've looked through the manual but can't find anything in there about
> setting how large the map tip popup actually is.  The information I
> can find on Google only works for earlier QGIS versions where the tip
> resized to fit the content, but this no longer appears to be the case.
>
> How can I make the map tip closer to the 1024x768 size of my HTML
> content, so I can see the full content without the map tip having any
> scroll bars at all?
>
> Thanks,
> Adam.
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>


-- 

[image: image.png]

Yoann Quenach de Quivillic

*Consultant Senior*

17 Rue Claude Chappe - 35510 Cesson-Sévigné

www.itlink.fr

-- 


This
message and any attachments (the "message") are confidential and
intended solely for the addressees. Any unauthorised use or dissemination 
is
prohibited. As e-mails are susceptible to alteration, 
















IT link (and its subsidiaries) shall not be
liable for the message if 
altered, changed or falsified.


Ce message et toutes les pièces jointes 
(ci-après le "message") sont confidentiels et établis à l'intention 
exclusive de ses destinataires. Toute utilisation ou diffusion non 
autorisée est interdite. Tout message étant susceptible d'altération, 
















IT Link (et ses filiales) déclinent toute responsabilité au 
titre de ce message s'il a été altéré, déformé ou falsifié.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231009/23a1ed0f/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 49793 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231009/23a1ed0f/attachment-0001.png>


More information about the QGIS-User mailing list