This JSAPI team plans to add this capability in 4.0.
For a JSAIPI 3.x stop gap you can try Cereal (https://github.com/swingley/cereal) if you have a simple map, but it is very incomplete and not actively maintained.
I'm trying to achieve the exact same thing. Did you ever find a solution?
Or is there anyone who is able to do this?
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.