Comments (12)
Can you attach your .qgz project and some example data in a zip?
from qgis2web.
@andreaordonselli
seven.001.zip
from qgis2web.
from qgis2web.
@andreaordonselli please change the above files to seven.zip.001 and seven.zip.002, then unzip them, thanks very much for your quick response
from qgis2web.
What gives error is the unsupported symbology of v6_time....
You could use this symbology to avoid export errors
Let me know if you can solve it with this method
from qgis2web.
Hi @andreaordonselli, I changed the symbology of v6_time to "simple fill", the export works now, thanks.
But there are still two issues, 1)the labels of the "Waihai" contour are missing; 2) I used an expression to control the Stroke width of the "Waihai" contour, it seems that the exported web map doesn't support expression.
Do we have a support or un-support feature list?
from qgis2web.
Yes, in WIKI there are supported feature list:
https://qgis2web.github.io/qgis2web/#SetStyles
https://qgis2web.github.io/qgis2web/#setLabels
The expressions are not supported for example. I'll see if I can provide you with code for repeating the label along the perimeter.
from qgis2web.
For the labels I have to work on it, for the line stroke you could create a new field where you place the expression result values ββand theme the stroke based on these
Then
from qgis2web.
The solution of "replacing expression with a new field" works, thanks!
from qgis2web.
As for the labels, I can't understand why if I use your project the export doesn't show the labels.
If instead I copy all the multilines of "Waihai" into a new linear vector layer, and export, the labels are visible.
Add this code to the bottom of the "Waihai" style file located in the "styles" folder of the export
var interval = 1200;
var geometry = feature.getGeometry();
if (geometry.getType() === 'MultiLineString') {
geometry.getLineStrings().forEach(function (line) {
var length = line.getLength();
var intervals = Math.ceil(length / (interval * resolution));
for (let i = 1; i < intervals; ++i) { //will not place labels at the start and end of the line
// for (let i = 0; i <= intervals; ++i) to include them
var point = line.getCoordinateAt(i / intervals);
var styletext = new ol.style.Style({
text: new ol.style.Text({
text: labelText,
font: labelFont,
fill: new ol.style.Fill({
color: labelFill
}),
stroke: new ol.style.Stroke({
color: bufferColor,
width: bufferWidth
}),
})
});
styletext.setGeometry(new ol.geom.Point(point));
style.push(styletext);
}
});
}
The result will show the labels repeated along the linestring, adjust "var interval" with the necessary value
from qgis2web.
@andreaordonselli thanks, I'll try if I could apply your solution in my project
from qgis2web.
You're welcome. If you are happy with qgis2web I kindly ask you to consider donating a virtual coffee via the button on the home page to support the development of the project, thank you.
from qgis2web.
Related Issues (20)
- max-height of popup-content HOT 2
- Python error HOT 1
- Blank preview and map HOT 5
- Python error HOT 4
- WMS Map from geoportale.regione.lazio.it not showed HOT 8
- Incorrect translation from Dutch names (look like English) in the Dutch language again. HOT 2
- popup join data - popup link - popup video HOT 4
- qgis2web plugin produces a webmap with an 'image' icon instead of the attached image. HOT 15
- Layer Search not working with Geopackage fid HOT 6
- Popup boxes appear vertically elongated with lots of content rather than wide enough to accommodate the information HOT 7
- Diagrams are not supported - Do not use apostrophe in fields HOT 9
- export page is blank HOT 3
- TypeError: Exporting to FTP HOT 1
- XYZ tiles exporting to overlaysTree not baseMaps HOT 4
- Collapse group in Layers List HOT 2
- leaflet filters - same height as map HOT 3
- IndexError when exporting as Leaflet HOT 1
- Categorized simbology bug HOT 6
- How to export to a designated folder just from python? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qgis2web.