Quick Tip: Fun with Electron
Yeah, that’s right, you can have a web app with built-in node support. This means you have access to all the normal node stuff you’d expect, file system as well as other modules you might add via npm. So if you were to add Leaflet and Esri-Leaflet as npm modules, you could just write some code like this and it would work.
The code to start the app is just taken from the docs.
I did have some issues trying to request GeoJSON data from an external service and load it into the map. If I happen to figure this out, I’ll post an update.
I put this quick sample on github if you want to try it out. I’m still playing around with Electron, mixing node and non-node environments. The cool part here is you can spawn new process, ala web workers, to handle some heavy lifting for you. A very nice sample app I found while digging around was this one that can preview local GeoJSON files.