<div dir="ltr">I was very interested to see if this was possible with qgis expressions and symbology, and I got it to work with surprisingly little effort, albeit with some issues [1].<div><br></div><div>I simply used the rule based symbology to highlight the relevant features using an expression [2].</div><div><br></div><div>The expression I used was as follows:</div><div><br></div><div>if(<br>  distance($geometry,<br>    geometry(<br>      get_feature('Lines','fid','1')<br>    )<br>  ) < 500<br>,true,false)<br></div><div><div><br></div><div></div><div>One caveat is that the view does not automatically update when digitizing a new vertice. As a result I needed to zoom in and out constantly to update the symbol styles. This could probably be modified by using a layer action though.</div><div><br></div><div>Secondly, this expression is limited to a single feature in it's current state. I'm not sure if anyone has a clever workaround for including all geometries from another layer in an expression.</div><div><br></div><div>Lastly, this only tracks actual features, not the cursor.</div><div><br></div><div>There could be many other ways to achieve your result though, but I was interested to see how well this would function so others might find the result quite interesting. It's probably also quite usable for static styles if the objective is just for mapmaking rather than a digitizing tool.</div><div><br></div><div>[1] <a href="https://imgur.com/a/5J0dSt3">https://imgur.com/a/5J0dSt3</a></div><div>[2] <a href="https://imgur.com/a/E043vO7">https://imgur.com/a/E043vO7</a></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 24 Dec 2020 at 15:31, Raffaele Ceretto <<a href="mailto:cerettoraffaele@gmail.com">cerettoraffaele@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I need a tool that allows me to draw a line and that at the same time highlights points within a certain distance (for example 40 meters).<br>I have a map with hundreds of points, I would like when I draw a line what is nearby will light up.<br>There is a specific tool to do this or a simple "magnet" function?<br>Thank you for your help<br><br>waiting for a reply<br><br>regards<br><div><br></div><div>Raffaele</div></div>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>