Hot answers tagged

23 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,118
22 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,036
12 votes
Accepted

How can I include HTML in a Folium Marker popup?

You should check the Folium version you are using. 0.2.0 has changed how popups are added, as explained in this issue thread: https://github.com/python-visualization/folium/issues/360 Popups now no ...
Nevermore's user avatar
  • 236
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

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.1k
9 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
  • 7,678
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.5k
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,399
7 votes
Accepted

Automating Pop up configuration of web app in ArcGIS for Portal?

If you're using Portal for ArcGIS or ArcGIS Online you can manage your configuration files via the ArcGIS Online Assistant. Login with your Portal or ArcGIS Online credentials and select 'View an Item'...
Radar's user avatar
  • 10.6k
7 votes
Accepted

Generate HTML file with R using Leaflet

Try to set the selfcontained variable to FALSE. That worked for me. Beside that make sure that the Shape of France is saved with the coordinate system WGS 84 (EPSG:4326). # install packages install....
wittich's user avatar
  • 2,356
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
  • 61.6k
6 votes
Accepted

Leaflet Opacity Control Using Slider For Bootstrap

There is a setOpacity method for TileLayer. This should do what you want: $('#rangeSlider').slider().on('slide', function (ev) { sliderVal = ev.value; background.setOpacity(sliderVal/100); });...
nathansnider's user avatar
  • 2,091
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,143
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
  • 39.8k
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,036
6 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
  • 63.1k
5 votes
Accepted

How to let the user resize a Leaflet map <div>

Outside of polling for size changes, there isn't a way to detect a resize of a <div>. I usually use absolute positioning on the map container and let Leaflet handle resize automatically. Like ...
adam's user avatar
  • 146
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
  • 83.7k
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,765
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
  • 39.8k
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,016
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
  • 1,877
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,036
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.3k
4 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

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