Legacy Javascript code sample for Esri blog