Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icons for “M” (linear referencing) geometry types #160

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

effjot
Copy link
Contributor

@effjot effjot commented Dec 22, 2023

Show geometry icons in locator search results for geometry types with “M” coordinate, e.g. LINESTRINGM.

Copy link
Member

@Gustry Gustry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Note, when QGIS 3.28 will be minimum version, there is a builtin function in QGIS now https://api.qgis.org/api/classQgsIconUtils.html, I will make a patch in the plugin to use this function instead.

@Gustry Gustry merged commit 622761b into 3liz:master Jan 8, 2024
4 checks passed
@Gustry
Copy link
Member

Gustry commented Jan 8, 2024

Hum, the geometry is a string, because we get it from ... d.geometry_type, ... FROM pgmetadata.export_datasets_as_flat_table('{locale}') d, not sure it's worth it to build the QgsMapLayer to use QgsIconUtils.

@effjot
Copy link
Contributor Author

effjot commented Jan 8, 2024

return QgsIconUtils.iconForWkbType(QgsWkbTypes.parseType(geometry_type)) should do the trick, but I haven’t tested it fully yet.

@Gustry
Copy link
Member

Gustry commented Jan 8, 2024

Thanks for checking.
I haven't tried, but just to keep notes : #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants