Difference between addTaskLayer and overlay extension


What’s the difference between using addTaskLayer and overlay extension? Both seem to be doing the same thing?


Hi @Joseph,
Usually, they used for different purposes. The addTaskLayer is used to add additional elements for the tasks. And because it usually takes the task object as a parameter, it is more “flexible” in work with tasks objects

The overlay extension is a more appropriate thing, if you want to add some additional elements to the whole gantt chart.
Also, the overlay has its own specific API methods, which are available only in this extension.

Here are some samples which could make the differences more understandable:

Overlay extension:


Hi @Siarhei,

Thanks for the explanation. I think I got it better now.