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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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&...
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'...
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....
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.
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);
});...
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 ...
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:...
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.
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+...
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 ...
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/...
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 ...
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>...
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="...
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 ...
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 ...
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&...
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" ...
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 ...
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>...
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 ...
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("...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
html × 445javascript × 150
leaflet × 114
qgis × 83
css × 37
openlayers × 32
arcgis-maps-sdk-javascript × 31
openlayers-2 × 28
geojson × 28
popup × 28
carto × 27
web-mapping × 18
print-composer × 17
arcgis-online × 16
geoserver × 15
python × 14
mapbox × 13
jquery × 13
maptips × 13
legend × 11
arcgis-desktop × 9
wms × 9
layers × 9
google-maps × 9
image × 9