[Qgis-user] Toggle Attribute

Jorge Gustavo Rocha jgr at geomaster.pt
Mon Nov 23 06:24:35 PST 2020


Hi Mike,

Just create an action with something like this to see it in action:

https://www.google.pt/maps/@[% @click_x %],[% @click_y %]

This will open google maps at the place you clicked. If you want to get
something from the action called, you have to capture its output (and
return the right value from your script).

As Richard said, start with the default actions and you will see
different kinds of things that can be done with actions. Capturing the
clicked X,Y is straight forward.

Jorge

Às 13:22 de 23/11/20, Mike Flannigan escreveu:
>
> On 10/26/2014 I asked my first question in this forum:
>
> Coordinate Capture plugin allows one to click on the map, hit
> the "Copy to clipboard" button, and then use the lat/long on
> the clipboard. I want something similar, but I want to
> skip the "Copy to clipboard" button. Ideally I want to
> click on the map and it copies the lat/long to the clipboard,
> executes an external script, and puts the result on the map
> next to the place clicked. I can skip the last step if that
> is too complicated.
>
> Can that be done with "Actions"? Or is the Python Console or
> some other means a better way to get this done?
>
>
>
> It went unanswered and I have never found a way to execute a
> script upon a click.  I've seen others who wanted actions based
> on a click or hover, but no clear solutions presented.  It sounds
> like you are on to something below.
>
>
> Mike
>
>
> On 11/23/20 5:24 AM, qgis-user-request at lists.osgeo.org wrote:
>> I tried a little bit with "actions" but - I think you're right - there
>> is no onHover.
>>
>> anyway, I found a much more comfortable solution for the moment.
>>
>> I add the simple term "OR is_selected()" in the if clause for my symbol
>> to show the changed color (in my case I draw a line between two points)
>> and it worked like a charme.
>>
>> But, this is without the option to e.g. display a messagebox or someting
>> like that with additional informations of the feature (I know about map
>> hints/tips (I do not know the right translation).
>>
>> Yes you could made an action for that, but my goal was to show this on
>> hover, but click is oooookay.
>>
>> For X-Mas my wish in relation to QGIS is a hover event ... on feature on
>> map and on symbols.;-)
>>
>> Thanks for helping to everyone.
>>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-- 
Email Signature
Logo <https://www.geomaster.pt> 	
*Geomaster*
*Jorge Gustavo Rocha* | Software Engineer
*e:*jgr at geomaster.pt | *m:*+351 910 333 888
*g:*41.54094,-8.40490 | *v: *510 906 109
*a: * Rua António Cândido Pinto, 67, 4715-400 Braga

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201123/849eab26/attachment.html>


More information about the Qgis-user mailing list