-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Update older annotation items to new framework #269
Labels
Comments
Thank you for submitting your proposal to the 2024 QGIS Grant Programme. The 2 week discussion period starts today. At the end of the discussion, the proposal author has to provide a 3-line pitch of their proposal for the voter information material. (For an example from last year check qgis/PSC#58 (comment)) |
nyalldawson
added a commit
to nyalldawson/QGIS
that referenced
this issue
Aug 1, 2024
Adds a new "Linked layer" setting to the render page for annotation layers, which allows users to optionally set a linked visibility layer for the annotation layer. If set, then the annotations will only be drawn when the linked layer is visible in the map. This is designed to mimic the similar linked layer option for the older annotation framework, in order to close the feature gap between old vs new annotations Refs qgis/QGIS-Enhancement-Proposals#269
nyalldawson
added a commit
to qgis/QGIS
that referenced
this issue
Aug 2, 2024
Adds a new "Linked layer" setting to the render page for annotation layers, which allows users to optionally set a linked visibility layer for the annotation layer. If set, then the annotations will only be drawn when the linked layer is visible in the map. This is designed to mimic the similar linked layer option for the older annotation framework, in order to close the feature gap between old vs new annotations Refs qgis/QGIS-Enhancement-Proposals#269
The final report for this proposal has already been submitted. Can the issue be closed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
QGIS Enhancement: Update older annotation items to new framework
Date 2023/05/02
Author Nyall Dawson (@nyalldawson)
Contact nyall dot dawson at gmail dot com
maintainer @nyalldawson
Version QGIS 3.34
Summary
For decades, QGIS supported a few "annotation" item types for drawing over map canvases: text, HTML, SVG and "form" annotations. In version 3.16 a new framework for handling annotations and annotation layers was added to QGIS which was designed around modern requirements and provided a more flexible approach for annotations. This newer framework supports point, line, polygon, text-at-point and text-along-line annotations.
In order to keep existing workflows unaffected, the older annotation items (text, html, svg and form) were left untouched during the introduction of the newer framework. The unfortunate side effect of this is that users have two completely different annotation types used in QGIS, and each has a completely different means of creation, interaction and handling.
This proposal concerns moving some of the older annotation types (specifically "text" and "svg") over to the newer framework, in order to provide a more consistent and user friendly interface to QGIS users. Porting the remaining older annotation types ("html" and "form") is left as a potential follow up project. The Text and SVG items are targeted here as they are more widely used and consequently command a higher priority.
Missing Functionality
Some feature gaps exist between the existing Text and SVG annotation items and what is possible in the newer annotation layer framework. Specifically:
This functionality will need to be made available to the newer annotation layer framework in order to avoid loss of features.
Proposed Solution/Deliverables
First, the missing functionality described in the above section will be added to the newer QgsAnnotationItem and QgsAnnotationLayer class.
Specifically:
Then, a new QgsAnnotationPictureItem class will be created which allows for a (linked or embedded) picture to be shown on the map. This item will support SVG and raster image formats, and is intended as a direct replacement for the existing older SVG annotation type.
Finally, code will be added to QgsProject to ensure that the older text and SVG annotations are automatically translated to their newer annotation item equivalents so that older projects will appear correctly when loaded into newer QGIS releases.
Example(s)
(optional)
Affected Files
Performance Implications
None
Further Considerations/Improvements
(optional)
Backwards Compatibility
Projects created using the replacement item types will NOT be compatible with earlier QGIS releases. These annotations will disappear from the projects if opened in these older releases.
Issue Tracking ID(s)
Votes
(required)
The text was updated successfully, but these errors were encountered: