Add Shapefile Without using Portal's skill

1172
4
Jump to solution
01-23-2017 06:04 AM
FlorianCADOZ
Occasional Contributor

Hello word !

I'm using the JS API 3.17 (or something like that) and I would like to import a shapefile in my map as graphics (like there) but without using a portal url ('cause ain't got a portal licence but a server one only so I may not use that : http://www.arcgis.com/sharing/rest/content/features/generate

If someone has an answer for me ...

Thank you ! 😃

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Florian,

   If you do not have the ability to use the ArcGIS.com conversion utility service then you will have search for and use a JS Library that can read and convert a shapefile. There are some old ones out there that have not been updated or maintained in years so they would likely need quite a bit of work to be updated to the current version of the JS API. 

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Emeritus

Florian,

   If you do not have the ability to use the ArcGIS.com conversion utility service then you will have search for and use a JS Library that can read and convert a shapefile. There are some old ones out there that have not been updated or maintained in years so they would likely need quite a bit of work to be updated to the current version of the JS API. 

FlorianCADOZ
Occasional Contributor

Robert,

First, thank you for you answer !

Could you explain me the workflow you're thinking about ?

Is it something like :

I import the shapefile through a classic input, calling a third lib who wanna parse the shapefile and gonna give me a json/geojson ?

Thanks by advance !

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

As a shapefile is made of multiple files it will have to be zipped (as the esri utility requires as well) and you would use a file input dijit to get this data and the use the 3rd party library to parse the shapefile to get json and then you would create a FeatureLayer using a FeatureCollection.

0 Kudos
FlorianCADOZ
Occasional Contributor

Alright, I get it !

I wanna use this lib and now I have to figure out how to use it in the angular-esri-map api !