[GIS] How to use Leaflet with esri-leaflet and ArcGIS Online services

arcgis-onlineesri-leafletleaflet

I've used public ArcGIS Online services plenty of times in ESRI JS web apps and I imagine that using them as layers in Leaflet is pretty much the same. The one problem I can see is how would one access a private service? In the ESRI JS api provides an Identity Manager to facilitate OAuth and cookie handling. Leaflet provides no such facilities.

Has anyone done this?

Best Answer

There is an existing example up on GitHub which shows how to use simple OAuth authentication, and an open issue for supporting private services. The project is currently a development preview, but feel free to chime in on GitHub with your thoughts or, if you have running code already, pull requests.

Related Question