These extensive plugin and control libraries can also be used pretty seamlessly with Esri-Leaflet as well, after all, it's just another plugin built on top of Leaflet and that opens a wide door of possibilities!
Swimming in Cache
Here is a demo. If you use something like the Chrome DevTools to view the IndexedDB for example, you can see the tile data being stored.
That is pretty cool and all you have to do is pass an option the basemapLayer. The Plugin extends the TileLayer and so does the basemapLayer in Esri-Leaflet, so you get this functionality for free.
Keeping it realtime
Another neat plugin for Leaflet is the realtime plugin. The realtime plugin is cool because it can do realtime by either working with a pub/sub service or by polling a service that will provide updates. It's flexible in this regard. Of course ideally you would want your service to return data in GeoJSON. Once you have added this plugin to your project, you can just add it like any other layer and when it's updated, have the map follow the latest location. For fun, in this example, we are drawing a line as the location is updated to trace it's route. Now you can feel like you're working with Jack Bauer!
There are a plenty of controls available for Leaflet as well. A control is usually distinguished from a plugin as a visual component that you can interact with or displays some information on the map (think widgets). Plugins usually provide some enhanced map functionality. A simple, yet useful control is the Weather widget. This widget requires jQuery and it's own css file, but once those are added, you can use it in your application.
This is only a tiny sample of how you can incorporate plugins and controls into your application. Leaflet has a very active community and there are lots of plugins and controls available for it. So if you are using the Esri-Leaflet plugin to work ArcGIS Online or ArcGIS Server services, you now have access to a whole variety of tools you just might find useful. Esri-Leaflet even has components that are separate plugins like a Heatmap FeatureLayer.
For more geodev tips and tricks, check out my blog.
Softwhere Developer at Esri working on cool stuff!
ArcGIS Web Development - https://amzn.to/2EIxTOp
Born and raised in East L.A.