Hi all,
Is it possible to create a web app using leaflet and a webmap from ArcGIS online?
Here's my dream:
Let customer update his/her map using Portal for ArcGIS (webmaps) while I work on the design/layout of the map template/wrapper using Leaflet.
If that is not possible, then my other option would be to learn how to use leaflet and the ArcGIS API for Javascript.
Do I understand this correctly? Thanks.
You are in luck.
The docs and samples are really well written. I think you'll find some great resources there.
I've seen that, but it doesn't look like it accepts the ArcGIS.com webmap ID (only basemaps).
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.
Here are a few links that you can look at that might help you also-
Leaflet Vector Layers | GeoJason
Web map by ID | ArcGIS API for JavaScript
Maybe a combination of these two JS scripts can get you closer to what you are looking for.
Hi Nick
you can create web maps based on ESRI leaflet from your browsers.
Take a look at map viewer app and feature details apps
You look at the demos at Cartoview
you will need to downlaod and install cartoview then login as admin then create new map viewer.
Take a look at the sample mapviewer apps
The core team maintaining Esri Leaflet currently has no plans to implement support for loading webmaps via their id, but it would make a viable plugin if anyone else wants to tackle it.
see our roadmap for more information.