mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-04 00:30:59 -05:00
Not an ideal implementation (too much logic resides in the gui QgsMapCanvasAnnotationItem class), but any approach using current api will be dependant on some hacks. Ideally we need a QgsVectorDataProvider method for finding the closest feature(s) to a point(/line/polygon) within a certain tolerance, with provider specific implementations which offload this to the data store's spatial indices. Then this handling could be bumped up to reside in QgsAnnotation.