minorua / Qgis2threejs

3D map visualization and web export plugin for QGIS
http://minorua.github.io/Qgis2threejs/docs/
495 stars 91 forks source link

Allow expressions to be used for labeling #257

Closed kannes closed 2 years ago

kannes commented 2 years ago

At the moment one can select an attribute to be used for labeling. It would be great if one could use an expression, e. g. to concatenate two attributes or to restrict text to a specific length.

kannes commented 2 years ago

Awesome, thanks!

stan2345 commented 2 years ago

Greetings Can you please provide a sample expression for the expression dialogue for me to extrude my buildings from one of my attributes in my buildings layer? The new version of the plugin only allows you to add expressions. There is no drop down box to simply select an attribute field with the height values. Thanks!

kannes commented 2 years ago

The dropdown lists all attributes that are numeric and thus can be used for extrusion. If your attribute is not numeric you need to convert it, e. g. with to_real("column") or to_int("column").

stan2345 commented 2 years ago

That worked!!!

Thanks so much for the quick response!

Take Care

Jinger1025 commented 1 year ago

Sorry, where to use these code? I am still can't make sure how to drop down box to simply select an attribute field with the height values. If the expression is needed, could you please give me case how to calculate?