Hot answers tagged

17 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 ...
user avatar
  • 4,645
17 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 ...
user avatar
  • 3,653
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 ...
user avatar
10 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 ...
user avatar
  • 216
8 votes

How do I embed a Leaflet map into my web page, using QGIS2Leaf?

This is a general answer since you didn't provide any code to work with. Note that I assume you have managed to work out the QGIS2LEAF plugin. The output of the plugin gives you a folder with an index....
user avatar
  • 3,070
8 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 ...
user avatar
  • 12.3k
7 votes
Accepted

toggle visibility of a Layer in Openlayers 3(!) with a Checkbox

You need to call setVisibility(true/false) on the layer. setVisibility All you are doing in your code is changing the value of static variables. This will not trigger any action on the layer. In ...
user avatar
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'...
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....
user avatar
  • 2,328
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.
user avatar
  • 52k
7 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&...
user avatar
  • 6,099
7 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 ...
user avatar
  • 9,380
7 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 ...
user avatar
  • 6,350
6 votes
Accepted

OpenLayers 3.5 WFS-T update to GeoServer 2.7 raises StringIndexOutOfBoundsException

This is because boundedBy / bbox is a property that OpenLayers creates when parsing the GML, it is not a real feature property. So when you update, you should clone the feature and get rid of it. Some ...
user avatar
  • 2,384
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); });...
user avatar
  • 2,031
6 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 ...
user avatar
  • 176
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 ...
user avatar
  • 6,853
6 votes
Accepted

Full Code for showing Shapefile or Geojson in Leaflet

This is a map from GeoJSON, that reads from a GeoJSON file using JQuery and plots the points as circleMarkers, it has a popup and will zoom to the extents of the points: http://www.gistechsolutions....
user avatar
5 votes

Parse PHP/HTML to shapefile or similar

This only a partial answer and lacks all python but too long to fit into a comment field. Your data is rather easy to convert into WKT: capture the coordinate part switch commas to spaces and spaces ...
user avatar
  • 52.5k
5 votes
Accepted

Custom HTML Within Leaflet Map

Your events are propagating to the map. Leaflet provides DomEvent methods to prevent this, for example (using jQuery): $('div').each(function () { L.DomEvent.on(this,'mousedown',L.DomEvent.stop); ...
user avatar
  • 6,738
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 ...
user avatar
  • 126
5 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:...
user avatar
  • 34.7k
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/...
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 ...
user avatar
  • 2,281
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>...
user avatar
  • 82.1k
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="...
user avatar
  • 6,457
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 ...
user avatar
  • 34.7k
5 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.
user avatar
  • 3,653
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&...
user avatar
  • 1,702
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" ...
user avatar

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