3

I'm using qgis2leaf on QGIS 2.6.

I'm actually working on a map. I need biggers popup. I succeed to change the popup width and height in the leaflet.css file. But the text inside do not fill the whole popup, but just a tiny part on the left. I'm afraid I'm not clear, so you can see my problem using the link below (on the map, clik for example on "THERMES DE CARACALLA"). http://jbouffand.free.fr/spip.php?article320

Can someone help me?

4

There are Leaflet options for the popups: http://leafletjs.com/reference.html#popup-options. You should be able to alter the .bindPopup line in index.html to include such options:

bindPopup( html | el | popup, options? )

(http://leafletjs.com/reference.html#marker)

| improve this answer | |
1

You need to change iframe's attributes.

You should add in your page's css something like

iframe {
width:500px;
height:500px;
}

or in the iframe code

 <iframe src="http://jbouffand.free.fr/IMG/html/thermes_de_caracalla.html" height="500px" width="500px"></iframe>

or whatever value of height and width suits your needs.

You should also define the height in the div class below

 <div class="leaflet-popup-content" style="width: 500px; height: 500px">

Is this what you want? enter image description here

| improve this answer | |
  • Thanks for your quick answer. I tried both, but it didn't work! – Jerome Dec 5 '14 at 15:18
  • But I tried both in my chrome developer tools and they worked. Where do those iframes come from?Are they in your points file? – geoSAM Dec 5 '14 at 16:07
  • PLease see my improved answer above. Isn't that what you want? – geoSAM Dec 5 '14 at 16:38
  • Thanks, it's exactly what I want. I try it tonight, if I can! – Jerome Dec 5 '14 at 17:12
  • It worked perfectly! I used your second methode. I made a mistake at the beggining, that's wy it doesn't work first. Thanks to you and to Tom Chadwin too, his idea was interresting too. – Jerome Dec 6 '14 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.