I am trying to do the same:
Would it be possible on the _createWebMap: function (itemInfo) { } function
instead of using the
arcgisUtils.createMap(itemInfo, "mapDiv", {
usePopupManager: true,
bingMapsKey: this.config.bingKey
});
to take the parameters passed in as itemInfo, to use those to build the leaflet map?
Some of the options passed into the itemInfo are:
- baseMap
and
- operationalLayers
These could for e.g. be used to create the leaflet map and to add initial basemap to it, and also the operational (feature, tiled, or dyanmic) map layers.
My other question is how some of the built in esri widgets like the basemapgallery or measure tools would interact with the leaflet api. For e.g. these esri widgets take map as a parameter. It may not be possible to just pass in the leaflet map object to that parameter, nor would it be that the leaflet map would expose an underlying map object that would be compatible. The other option might be to forgo the esri widgets to use corresponding leaflet plugins.
Disclaimer: just investigating these things myself, or started to. Above claims may or may not work.
Thanks.