We just pushed out a new version of Esri-Leaflet and now its easier than ever to get familiar with the source code of the API.
Steps:
- navigate to https://github.com/Esri/esri-leaflet/releases and download the Source code (zip) associated with Release Candidate 2
- unzip the folder on your own machine
- navigate to the ‘debug’ folder and open ‘sample.html’
This application points at local source files that are organized in the same directory structure as the GitHub repository itself. This means that you can use the developer tools inside your browser to inspect the API source.
I’ve always found that setting breakpoints and stepping through the code slowly makes the logic that’s being employed to talk to ArcGIS Server and ArcGIS Online hosted content a lot easier to understand.
- Ideally, you should probably consider configuring a local web server like Apache or IIS to develop with (so that you can load your applications using ‘http://’ protocol in a browser instead of relying on ‘file:///’), but it's just cool to say that digging into the source is as easy as 1, 2, 3