59
Views
7
Comments
Solved
[LeafletJS - Reactive] How to add onclick events for markers?
Question
Forge component by Vincent Koning
5
Published on 22 Jun 2020

Hi there,

I've used the leafletjs javascript library previously, but never interacted with it in outsystems.

How would I trigger a client action to happen on click of a marker...?

I know usually you would include .on('click', myfunction). I tried a few variations of this but could'nt get it to work.

Many thanks,


Gavin

Solution

Hi Gavin,

You can either download it from the Forge website via the download button;


or use the demo installation button in Service Studio. 

Under normal circumstances you get an "Install" button instead of a download button but since I'm already working on a new version I can't. 

Rank: #45

Hi Gaving,


You have to write handler for OnClick Event given by the component.


For more details about event and handler you can visit below links if not done yet.

https://www.outsystems.com/learn/lesson/807/blocks-and-events/
https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Reuse_UI/Use_Events_to_Propagate_Changes_From_a_Block_to_the_Parent


Hi Gavin,

Be sure to take a look at the demo. There are several demo's going into detail on how to handle events. Should you have any specific questions than please let me know.

Greetings,

Vincent

Solution

Hi Gavin,

You can either download it from the Forge website via the download button;


or use the demo installation button in Service Studio. 

Under normal circumstances you get an "Install" button instead of a download button but since I'm already working on a new version I can't. 

Hi Gavin,

Perhaps it's best to create a new thread for this. And if you could create a small PoC that demonstrates your issue that would be really helpful. That way I can analyse you demand a better.

Greetings,

Vincent