Skip to main content
26 votes

Display photo stored as blob in GPKG

To display the photo stored as blob in GPKG or PostgreSQL, one simple solution is to use QGIS HTML Widget. It is a widget to be used in forms. It can be used also for a table without geometries. Add a ...
jgrocha's user avatar
  • 5,445
25 votes
Accepted

QGIS Labels with HTML formating

As others have already mentioned, HTML formatting for labels is currently limited to colors. But with a very nice undocumented feature we can build dynamic labels, using label backgrounds with inline ...
christoph's user avatar
  • 5,857
12 votes

How can I convert an image into map tiles for leafletJS

If your image is smaller than 16000 pixels high/wide, then consider using a L.ImageOverlay, and check if the performance is acceptable for your use case. (Web browsers start breaking with images ...
IvanSanchez's user avatar
  • 10.3k
12 votes
Accepted

Font size in HTML in QGIS' print composer only starts to change at 6

Problem The <font> tag's size property is only defined for values of 1 through 7. MDN says about the <font> tag: Obsolete This feature is obsolete. Although it may still work in ...
StefanBrand_EOX's user avatar
10 votes

Display photo stored as blob in GPKG

Well, I've gotten my kluge to work, though I hope someone still comes up with a better answer! I've created custom functions for manipulating blobs via expressions (see definitions below.) I can now ...
Houska's user avatar
  • 8,196
9 votes
Accepted

Widget html QGIS

You can create a more complex JavaScript function to create your div and call it when ever you want in your html document : <script> function expr(field, class_name) { return "CASE ...
J. Monticolo's user avatar
  • 15.8k
8 votes
Accepted

R / Leaflet obtain clicked coordinates

Looks like you need more powerful tool to handle your problem. The solution in R may be using Shiny - basics in this link: https://rstudio.github.io/leaflet/shiny.html input$MAPID_click is an event ...
pajonk's user avatar
  • 196
8 votes
Accepted

Basic HTML Code for Map Tips

Use a table: <table> <th colspan=2><h1>ASSET</h1></th> <tr><td class="bold">NAME:</td><td>[% "First Name" %] [% "Surname" %]</td></tr&...
pLumo's user avatar
  • 6,519
7 votes
Accepted

Create web map from QGIS workspace

Use the QGIS To Web plugin? https://github.com/tomchadwin/qgis2web You'll have to find somewhere to host it, of course, but that plugin will help you create the web map.
Spacedman's user avatar
  • 65.1k
7 votes
Accepted

Creating a hyperlink in QGIS doesn't work

To make sure the filepath is recognized as such and not as a html link, use a file:/// prefix before the actual filepath - like in this example: file:///C:/Users/DU/Desktop/my_image.jpg Use Ctrl+...
Babel's user avatar
  • 73.2k
6 votes
Accepted

Adding GeoJSON layer on leaflet?

I suspect that the JavaScript code that you provide is within the index.js file? In that case, you just have to re-order your <script> tags to make sure your loc_infra variable is defined and ...
ghybs's user avatar
  • 7,223
6 votes
Accepted

Using HTML and CSS with QGIS Map Tips?

The width of the map tip box is computed without looking at all the data content and is therefore unlikely to fit. You can however set it to a known good size: <style> h1 {color:red; width:...
JGH's user avatar
  • 42.3k
6 votes
Accepted

Inconsistent display of HTML table font size in QGIS layouts

If you use CSS size definitions in QGIS, it‘s best to use em relative units instead of pt or px. pt/px units are changing with the dpi settings of the Layout.
christoph's user avatar
  • 5,857
6 votes

Creating map tip with pictures stored in relative path

you can put the images in a subfolder below your project and then you can refer to the images as a relative path...in the example below I have a field imagestoring the file name, which are located in ...
eurojam's user avatar
  • 11.2k
5 votes

R / Leaflet obtain clicked coordinates

Since I struggled to find this answer, in your server block, you need something like this: observe({ click = input$map1_click if(is.null(click)) return() text<-paste("...
Pat Lorch's user avatar
5 votes

Show popup on marker hover / mouseover, hide on mouseout, and keep open on click

I believe this issue is due to the fact that leaflet automatically closes popups on click. So, on click, it closes and then re-opens. There is an option on the map for this: http://leafletjs.com/...
jmfolds's user avatar
  • 313
5 votes

How to add links to popups in Mapbox GL JS

Your assumption in the last paragraph is actually true, because this has nothing to do with Mapbox GL JS, but only with basic HTML. Basically you have to define a link with the <a> tag inside ...
tallistroan's user avatar
  • 2,351
5 votes
Accepted

How can I write in really big font size using a QGIS html box?

I set font-size in a surrounding span when font size alone didn't do the trick <span style="background-color:%s; padding: 5px; font-size: %spx;"> <font face="%s" color="%s">%s</font>...
underdark's user avatar
  • 84.3k
5 votes

How can I convert an image into map tiles for leafletJS

As suggested in comments here I would and have used gdal2tiles it's relatively easy and fast to use if your image isn't too large. I wouldn't recommend doing that through QGIS due to the fact that it ...
Dror Bogin's user avatar
  • 3,555
5 votes

How to insert multiple images in the Atlas in QGIS?

Just use expression to link the attribute as a source for your image like you do in case CROSS SECTIONS attribute [% "Cross-Sect"%] In your case use: <img src=[% "PHOTOS"%] width="600" height="...
Oto Kaláb's user avatar
  • 6,925
5 votes

Map tips showing only path instead of pictures in QGIS?

Three things needs to be addessed: 1) as @snaileater said, the path must be quoted 2) the ending </img> tag must not contain spaces, else is will be printed as text 3) a local file URL must ...
JGH's user avatar
  • 42.3k
5 votes

Clickable label (HTML, Link) in PDF export (QGIS)

This method is software dependent and may not work with some PDF readers. Tested with Acrobat Reader DC (OS: Windows 10). To create a PDF file with clickable links inside polygons, just save the ...
Comrade Che's user avatar
  • 7,271
5 votes
Accepted

QGIS - Need a different KML balloon style when exported

You could use the QGIS field calculator to add a column with an expression to build the HTML you want for the popup. We can take @öbl's html and convert it to a field calculator expression: '<table&...
M Bain's user avatar
  • 2,062
5 votes

Сhanging pop-up font size in qgis2web

I tried this and it worked: <div id="map"> <div id="popup" class="ol-popup"> <a href="#" id="popup-closer" ...
OnceUponATime's user avatar
5 votes
Accepted

How to word-wrap HTML in Mergin Input?

There are multiple ways to create a line break in HTML, like style='word-break:break-all' or using <textarea>...</textarea>, but unfortunately none of them work here. Instead you can use ...
christoph's user avatar
  • 5,857
4 votes

OpenLayers 3: putting an image (or logo/legend) on the map

Just put the <div id="legende">...</div> in <div id="map"> like below: Load a QGIS-Server-WMS-Layer to OpenLayer3 <div id="map"><div id="legende"> <h2>...
GeoSpatialEarth.in's user avatar
4 votes
Accepted

Saving HTML text permanently in map tip display text

ahmadhanb's answer is close, but if you click the "Save as Default" option from the Style dropdown menu in the layer properties than the style (including the map tip) will automatically be loaded ...
ndawson's user avatar
  • 27.8k
4 votes

How to set Google Maps pegman position programmatically?

Here you go. https://jsfiddle.net/35rpw0jv/ And this is how you center the Pegman (and the map) upon every street view move (position change). panorama.addListener('position_changed', function(){ ...
Dalibor Tesanovic's user avatar
4 votes
Accepted

Show popup on marker hover / mouseover, hide on mouseout, and keep open on click

It could be done like this, but I'm pretty sure it's not the best way because it only works for marker1. Anyway, it's a start. var marker1 = L.marker([51.505, -0.09]).addTo(mymap) .bindPopup("<...
Rodrigo Mota's user avatar
4 votes
Accepted

Width and Height of GetFeatureInfoUrl request with Openlayers 4.x and Geoserver

Width and Height in a GetFeatureInfo request relate to the width and height of the Map (product of a GetMap request) to which you are supplying your I/J pixel coordinate. This has nothing to do with ...
nmtoken's user avatar
  • 13.5k

Only top scored, non community-wiki answers of a minimum length are eligible