How would you add a shapefile to the map using the JS API? Thanks!
You don't need to be using portal to use the sample that Samuel linked to above - it just uses esriRequest to add the shapefile using the Portal REST API.
I think this question comes up periodically. Here's a discussion from back in January which might help you:
How to add a shapefile without ArcGIS Online
This way uses Leaflet calvinmetcalf/leaflet.shapefile · GitHub
Or you can try using Simple DynamicMapLayer | Esri Leaflet
--> with the last one, you don't need Portal.
I am not using the Portal. Is there another way? Thanks!
Hello Jerry,
Here is the documentation and sample.
Add shapefile | ArcGIS API for JavaScript
Thanks,
Sam
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.